Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description
每年平安夜的时候妈妈都会给小鑫邮寄两个大苹果,两个苹果的重量分别为x,y。以前小鑫都是自己默默的吃掉两个大苹果,但是这次小鑫决定要把最重的苹果送给他的女神。可惜他比较笨分不出哪个苹果重哪个苹果轻,所以请你帮他找到最重的苹果,输出最重的重量。
Input
单组输入。
两个正整数表示苹果的重量x,y(1 <= (x, y) <= 1000)
Output
输出两个苹果中最重的重量。
Sample Input
100 200
Sample Output
200
Hint
Source
xf
program
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,max;
scanf("%d%d",&a,&b);
if(a>b)
max = a;
else max = b;
printf ("%d\n",max);
return 0;
}
Output
100 200
200
Process returned 0 (0x0) execution time : 2.260 s
Press any key to continue.