思路梳理:
a,b,c三个数。
1,如果a<b 然后 ①c<b —> 最大是b
②c>b —> 最大是c
2,如果a>b 然后 ①c<a —> 最大是a
②c>a —> 最大是c
程序实现:
#include<stdio.h>
int main()
{
int a,b,c;
printf("please input three Integers:");
scanf("%d,%d,%d",&a,&b,&c);
if(a<b)
{
if(b<c)
printf("The max number is %d",c);
else
printf("The max number is %d",b);
}
else
{
if(c<a)
printf("The max number is %d",a);
else
printf("The max number is %d",c);
}
return 0;
}