@C语言大神:程序没错能执行,但是结果就不是数字是空格?求解释!

# include<stdio.h>
int main()
{
int a,b,c;
printf("please input a,b,c:\n");
scanf("%d%d%d",&a,&b,&c);
if(a<b) if(b<c) printf("the biggest number is%c:\n",c);
else printf("the biggest number is%c:\n",b);
else if(a<c) printf("the biggest number is%c:\n",c);
else printf("the biggest number is %c:\n",a);
getch();
}

第1个回答  2015-04-01
你的程序太乱了,下面这个程序简单实用,你可以试一下,你的程序主要是if语句实用有误
int a,b,c;

printf("please input a,b,c:\n");

scanf("%d%d%d",&a,&b,&c);

int max = a > b ? a : b;

max = max > c ? max :c;

printf("%d",max);本回答被网友采纳
第2个回答  2015-04-01
输入是%d,int型,输出是%c,char型,一个四个字节一个一个字节,还没有强转,怎么可能正确追问

那怎么办呀

追答

。。输出也用%d就可以啊

本回答被提问者采纳
第3个回答  2015-04-01
你的输出格式都是%c 你可以查看下ascii 码
第4个回答  2015-04-01
把 the biggest number is%c 换成 the biggest number is%d
相似回答