这个程序是要比较三个数大小,应该没写错啊,但是我验证的时候,如果输入的数是a>b>c,就出现错误了,比如我输入9,8,7就会出错,帮我看看是哪里有问题啊
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,t;
scanf("%d %d &d",&a,&b,&c);
if(a>b) t=b;
else t=a;
if(t>c) t=c;
printf("%d",t);
system("pause");
return 0;
}
|