问问
#include "stdafx.h"
#include"stdio.h"
main()
{
int a,b,c,max;
scanf("a=%d,b=%d.c%d",&a,&b,&c);
if(a>=b)
max=a;
else
max=b;
if(c>=max)
max=c;
printf("max=%d",max);
}
输出的结果为什么是乱码?
[解决办法]
[解决办法]
scanf("a=%d,b=%d.c%d",&a,&b,&c);//这个这样写的话,你输入的时候也要按照这个格式
//或者
scanf("%d,%d,%d",&a,&b,&c); //这样写也可以