这段程序怎么错的?

来源:百度知道 编辑:UC知道 时间:2024/05/16 07:39:43
本人刚刚接触C语言,设计的比较两个数大小的程序.但显示有两处错误,请诸位大侠帮忙指正.
#include<stdio.h>
int main
{
int a,b;
printf("enter:");
scanf("%d,%d,&a,&b);
if(a>b)
printf("%d,%d",a,b);
else
printf("%d,%d",b,a);
return 0;
}

#include<stdio.h>
int main() /*缺括号*/
{
int a,b;
printf("enter:");
scanf("%d,%d",&a,&b); /*少引号*/
if(a>b)
printf("%d,%d",a,b);
else
printf("%d,%d",b,a);
return 0;
}

输入4,5 回车 即可