记录详情

Compile Error

foo.c: In function 'Mul':
foo.c:3:23: error: expected identifier or '(' before '=' token
    3 | {       long long int =1;
      |                       ^
foo.c:4:19: error: invalid suffix ";i" on integer constant
    4 |         for(int i=0;i<n;i++)
      |                   ^~~~
foo.c:4:29: error: expected ';' before ')' token
    4 |         for(int i=0;i<n;i++)
      |                             ^
      |                             ;
foo.c:6:17: error: 'y' undeclared (first use in this function)
    6 |                 y=y*x;
      |                 ^
foo.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:14:18: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'long long int *' [-Wformat=]
   14 |         scanf("%ld%d",&x,&n);
      |                ~~^    ~~
      |                  |    |
      |                  |    long long int *
      |                  long int *
      |                %lld
foo.c:16:19: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=]
   16 |         printf("%ld",y);
      |                 ~~^  ~
      |                   |  |
      |                   |  long long int
      |                   long int
      |                 %lld
foo.c:17:16: error: invalid suffix ";" on integer constant
   17 |         return 0;
      |                ^~~
foo.c:17:19: error: expected ';' before '}' token
   17 |         return 0;
      |                   ^
      |                   ;
   18 | }
      | ~                  
foo.c: In function 'Mul':
foo.c:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    9 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
语言
C
递交时间
2022-10-10 10:47:35
评测时间
2022-10-10 10:47:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes