比较输入两个值得大小 这个程序输出错误 怎么回事
#include <stdio.h>int main()
{
float a,b,c=0.0;
scanf("%f,%f",&a,&b);
if(a<b)
printf("%.2f,%.2f",a,b);
else
{
c=a;
a=b;
b=c;
printf("%.2f,%.2f",a,b);
}
return 0;
}
2016-11-13 13:34
2016-11-13 13:41
2016-11-13 13:44
2016-11-13 14:16
程序代码:#include <stdio.h>
int main()
{
float a,b,c=0.0;
scanf("%f %f",&a,&b);
if(a<b)
printf("%.2f %.2f",a,b);
else
{
c=a;
a=b;
b=c;
printf("%.2f,%.2f",a,b);
}
return 0;
}

2016-11-13 14:16
2016-11-13 15:18
2016-11-13 20:44
2016-11-14 12:55