大神帮我看看,这段if语句哪儿的逻辑错了?
/* p112页第四习题有三个整数a,b,c,由键盘输入,输出其中最大数.
*/
# include <stdio.h>
int main(void)
{
int a, b, c, t;
printf ("请输入三个整数:");
scanf ("%d %d %d", &a, &b, &c); //输入整数abc
if (a < b)
{
t = a;
a = b;
b = t;
}
else if (a < c)
{
t = a;
a = c;
c = t;
}
else if (b < c)
{
t = b;
b = c;
c = t;
}
printf("a,b,c中的最大数为:%d\n", a); //输出最大数a
return 0;
}