记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:5:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'float *' [-Wformat=]
    5 |         scanf("%d,%d,%d",&a,&b,&c);
      |                ~^        ~~
      |                 |        |
      |                 int *    float *
      |                %e
/in/foo.c:5:20: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'float *' [-Wformat=]
    5 |         scanf("%d,%d,%d",&a,&b,&c);
      |                   ~^        ~~
      |                    |        |
      |                    int *    float *
      |                   %e
/in/foo.c:5:23: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'float *' [-Wformat=]
    5 |         scanf("%d,%d,%d",&a,&b,&c);
      |                      ~^        ~~
      |                       |        |
      |                       int *    float *
      |                      %e
/in/foo.c:8:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'double' [-Wformat=]
    8 |        printf ("%d\n",C);
      |                 ~^    ~
      |                  |    |
      |                  int  double
      |                 %f
/in/foo.c:9:5: error: 'else' without a previous 'if'
    9 |  }  else {printf("输入不合法\n");}
      |     ^~~~

信息

递交者
类型
自测
语言
C
递交时间
2025-11-13 16:33:10
评测时间
2025-11-13 16:33:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes