编的第一个小小小程序,为何不对呢,求教
编的第一个小小小程序,为啥不对呢,求教
#include <stdio.h>
int main(void)
{int a,b,c,x1,x2;
printf (" Please input three int:\n");
scanf ("%d%d%d",&a,&b,&c);
x1 = a>b?a:b;
x2 = x1>c?x1:c;
printf ("%d\n",x2);
return 0;
}
------解决方案--------------------
代码中不要包含中文和全角符号:
#include <stdio.h>
int main(void)
{int a,b,c,x1,x2;
printf (" Please input three int:\n");
scanf ("%d%d%d",&a,&b,&c);
x1 = a>b?a:b;
x2 = x1>c?x1:c;
printf ("%d\n",x2);
return 0;
}
------解决方案--------------------
代码中不要包含中文和全角符号:
#include <stdio.h>
int main(void)
{int a,b,c,x1,x2;
printf(" Please input three int:\n");
scanf("%d%d%d",&a,&b,&c);
x1 = a>b?a:b;
x2 = x1>c?x1:c;
printf("%d\n",x2);
return 0;
}