/ 科创班 /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:13:24: error: stray '\357' in program
     printf("%f,%f,%f\n",a,b,c);
                        ^
/in/foo.c:13:25: error: stray '\274' in program
     printf("%f,%f,%f\n",a,b,c);
                         ^
/in/foo.c:13:26: error: stray '\214' in program
     printf("%f,%f,%f\n",a,b,c);
                          ^
/in/foo.c:13:27: error: expected ')' before 'a'
     printf("%f,%f,%f\n",a,b,c);
                           ^
/in/foo.c:13:14: warning: format '%f' expects a matching 'double' argument [-Wformat=]
     printf("%f,%f,%f\n",a,b,c);
              ^
/in/foo.c:13:17: warning: format '%f' expects a matching 'double' argument [-Wformat=]
     printf("%f,%f,%f\n",a,b,c);
                 ^
/in/foo.c:13:20: warning: format '%f' expects a matching 'double' argument [-Wformat=]
     printf("%f,%f,%f\n",a,b,c);
                    ^

代码

#include<stdio.h>
void swap(double *a,double *b);
int main()
{    
     double a,b,c;
     scanf("%lf%lf%lf",&a,&b,&c);
     if(a<b)
     swap(&a,&b);
     if(a<c)
     swap(&a,&c);
     if(b<c)
     swap(&a,&c);
    printf("%f,%f,%f\n",a,b,c);
 return 0;
}
     void swap(double *a,double *b)
{
     double s;
     *a=*b;
     s=*a;
     *b=s;
}

信息

递交者
类型
递交
题目
按大到小的顺序输出三个数
题目数据
下载
语言
C
递交时间
2018-06-18 18:26:31
评测时间
2018-06-18 18:26:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes