记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:9:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    9 |            if (b>c)
      |            ^~
foo.cc:10:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   10 |                         centre=b;   max=a;
      |                                     ^~~
foo.cc:11:13: error: ‘else’ without a previous ‘if’
   11 |             else
      |             ^~~~
foo.cc:12:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   12 |                         if (a>c)
      |                         ^~
foo.cc:13:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   13 |                                 centre=c;   max=a;
      |                                             ^~~
foo.cc:14:17: error: ‘else’ without a previous ‘if’
   14 |                 else
      |                 ^~~~
foo.cc:17:9: error: ‘else’ without a previous ‘if’
   17 |         else
      |         ^~~~
foo.cc:18:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   18 |                 if (a>c)
      |                 ^~
foo.cc:19:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   19 |                         centre=a;   max=b;
      |                                     ^~~
foo.cc:20:13: error: ‘else’ without a previous ‘if’
   20 |             else
      |             ^~~~
foo.cc:22:33: error: ‘cenrte’ was not declared in this scope; did you mean ‘centre’?
   22 |                                 cenrte=c;   max=b;
      |                                 ^~~~~~
      |                                 centre
foo.cc:21:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   21 |                         if (b>c)
      |                         ^~
foo.cc:22:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   22 |                                 cenrte=c;   max=b;
      |                                             ^~~
foo.cc:23:17: error: ‘else’ without a previous ‘if’
   23 |                 else
      |                 ^~~~

信息

递交者
类型
递交
题目
A1-2 分支结构练习:三数的特征值
语言
C++
递交时间
2025-08-07 20:30:29
评测时间
2025-08-07 20:30:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes