c 程序 帮忙看看 怎么回事

来源:百度知道 编辑:UC知道 时间:2024/05/18 02:05:59
# include <stdio.h>
# include <conio.h>
void main()
{
int a,b,c,x,max;
printf("please input three numbers a,b,c\n");
scanf("&d,%d,%d",&a,&b,&c);
if(a>b)
x=a;
else
x=b;
if(x>c)
max=x;
else
max=c;
printf("max=%d\n",max);
getch();
}
输入三个数 ,输出最大值
我输入 4,5,6
输出 max=-84010000

# include <stdio.h>

void main()
{
int a,b,c,x,max;
printf("please input three numbers a,b,c\n");
scanf("%d,%d,%d",&a,&b,&c);
if(a>b)
x=a;
else
x=b;
if(x>c)
max=x;
else
max=c;
printf("max=%d\n",max);

}

%d 打错了你哦i