http://zhidao.baidu.com/question/450850558.html?quesup2
里面的解答有问题啊 并不能求出最大值啊!!(而且程序还有问题 for都不带{}号)
#include
void main()
{
int a,b,c,t;
printf("Please input three numbers:");
scanf("%d %d %d",&a,&b,&c);
if (a>b)
{t=a;a=b;b=t;} /*交换x,y的值*/
if(a>c)
{t=c;c=a;a=t;}/*交换x,z的值*/
if(b>c)
{t=b;b=c;c=t;}/*交换z,y的值*/
printf("MAX=%d",c);
}
问题没有写全吧
是程序输出3个数的最大值么