Seeking x, the maximum value of y

analysis:

Input - variables x, y stored input two integers;

Output - two integer variables for storing the input of the maximum value m, m is the output;

Algorithm - if x is greater than y, x is assigned m, y or assigned m.

#include<stdio.h>
void main()
{
int x,y,m;
scanf("%d%d",&x,&y);
if(x>y)
m=x;
else
m=y;
printf("Maxum is %d",m);
}

Guess you like

Origin www.cnblogs.com/zhangdemingQ/p/12050953.html