记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:9: warning: missing terminating " character
    5 |  printf("请输入两个整数“);
      |         ^
foo.c:5:9: error: missing terminating " character
    5 |  printf("请输入两个整数“);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:6:25: error: expected ')' before ';' token
    6 |      scanf("%d%d",&a,&b);
      |                         ^
      |                         )
foo.c:6:6: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    6 |      scanf("%d%d",&a,&b);
      |      ^~~~~~~~~~~~~~~~~~~
      |      |
      |      int
In file included from /usr/include/stdio.h:867,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note: expected 'const char * restrict' but argument is of type 'int'
  105 | printf (const char *__restrict __fmt, ...)
      |         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
foo.c:18:1: warning: format not a string literal and no format arguments [-Wformat-security]
   18 | }
      | ^
foo.c:17:15: error: expected ';' before '}' token
   17 |      return 0;
      |               ^
      |               ;
   18 | }
      | ~              
foo.c:4:14: warning: unused variable 'm' [-Wunused-variable]
    4 |  int a,b,r,n,m;
      |              ^
foo.c:4:12: warning: unused variable 'n' [-Wunused-variable]
    4 |  int a,b,r,n,m;
      |            ^
foo.c:4:10: warning: unused variable 'r' [-Wunused-variable]
    4 |  int a,b,r,n,m;
      |          ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A6-1 最大公约数专题:最大公约数和最小公倍数
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-03-01 01:39:49
评测时间
2022-03-01 01:39:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes