C程序这段代码有什么问题??????????????????

来源:百度知道 编辑:UC知道 时间:2024/06/05 17:30:31
#include <stdio.h>
main()
{
printf("*****************************************************\n");
printf(" Very good \n");
printf("*****************************************************\n");
int a,b,c,max;
printf("please input 3 number\n");
scanf("%d,%d,%d",&a,&b,&c);

if(a<b) max=b;
else max=a;

if(max<c)
max=c;

printf("max=%d\n",max);
}

int a,b,c,max;

声明语句要放在函数体的开头

要改成这样
main()
{
int a,b,c,max;
printf("*****************************************************\n");
printf(" Very good \n");
printf("*****************************************************\n");
printf("please input 3 number\n");

你这个程序没什么大问题,可以用。
你没说清问题。
我编译了一下可以用的。
你是不是输入时错了。
你输的3个数要用“,”分开。
eg:
4,8,9