• 2634 求两数最大值

    Time Limit : 2000/1000 MS(Java/Others) | Memory Limit : 65536/32768 KB(Java/Others)

    Submits : 9171 | Solved : 6628

    Description

    设计函数,对于给定的任意两个整数,计算并返回最大值。


    Input

    主函数中输入两个整数。

    Output

    设计函数计算并返回最大值。


    Sample Input

    87 65

    Sample Output

    87

    Template

    #include<stdio.h>
    
        @-@  //设计求两数最大值的函数
    
    int main()
    {
    	int x,y,m;
    	scanf("%d%d",&x,&y);
    	m=max(x,y);  //调用自定义函数,求两数最大值 
    	printf("%d\n",m);  //输出最大值
    	return 0;
    }

    HINT

    程序填空题,模板中@-@的位置是需要填空的部分。

    Source

    NBU OJ

    [ Top ] | [ Submit ] | [ Statistics ] | [ Standing ]