|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2013-3-1 19:28:02
|
显示全部楼层
#include "stdio.h"
void main()
{
double a,b,c,max;
printf("please input a number: \n");
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
if(a>b && a>c)
{
max = a;
printf("the max is %d \n",a);
}
else
{
if(b>a && b>c)
{
printf("the max is %d \n",b);
}
else
{
if(c>b && c>a)
{
printf("the max is %d \n",c);
}
else
{
if(a=b && a>c)
{
printf("the max is %d and %d \n",a,b);
}
else
{
if(a=c && a>b)
{
printf("the max is %d and %d \n",a,c);
}
else
{
if(b=c && b>a)
{
printf("the max is %d and %d \n",a,c);
}
else
printf("the number %d = %d = %d \n",a,b,c);
}
}
}
}
}
}
求三个数的大小,,,,,为毛不对呢?? |
|