|
5啊哈币
为什么比较大小一定要引入第三个变量c呢?不可以用 if a>b,输出a;else输出b吗?新手求指教。
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b)
if(a>b)
printf("%d",a);
else
printf("%d",b);
system("pause");
return 0;
}
|
最佳答案
查看完整内容
楼主看了下您的帖子 问题出在scanf("%d %d",&a,&b); 后面的这个;
细节注定成败- -
给分吧
|