记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:14: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  for(i=1;i<=n,i++)
              ^
foo.c:6:18: error: expected ';' before ')' token
  for(i=1;i<=n,i++)
                  ^
foo.c:9:34: error: stray '\357' in program
    printf("%d和%d是%d的因子",j,i,n);
                                  ^
foo.c:9:35: error: stray '\274' in program
    printf("%d和%d是%d的因子",j,i,n);
                                   ^
foo.c:9:36: error: stray '\214' in program
    printf("%d和%d是%d的因子",j,i,n);
                                    ^
foo.c:9:37: error: expected ')' before 'j'
    printf("%d和%d是%d的因子",j,i,n);
                                     ^
foo.c:9:13: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    printf("%d和%d是%d的因子",j,i,n);
            ~^
foo.c:9:18: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    printf("%d和%d是%d的因子",j,i,n);
                 ~^
foo.c:9:23: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    printf("%d和%d是%d的因子",j,i,n);
                      ~^
foo.c:8:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(j*i==n)
   ^~
foo.c:10:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    printf("%d+%d=%d\n",j,i,j+i);
    ^~~~~~
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-1 素数专题:因子的和
比赛
中北 计算机2021级专业修读指导(1)
语言
C
递交时间
2021-11-30 19:03:00
评测时间
2021-11-30 19:03:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes