Finding,and Sharing !
Sinton.
一、两个数大小比较:
int x,y,z;
if(x>y)
{z=x;x=y;y=z;}
二、三个数大小比较:
1.常规思维:
2.一行代码:
#include
void main()
{
int x,y,z,max;
printf("please input three number:");
scanf("%d%d%d",&x,&y,&z);
max=(x>y?x:y)>z?(x>y?x:y):z;
printf("THE MAX IS %d\n",max);
}