记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:9:13: 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: expected ‘}’ before ‘else’
   11 |             else
      |             ^~~~
foo.cc:9:9: note: to match this ‘{’
    9 |         {   if (b>c)
      |         ^
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: At global scope:
foo.cc:17:9: error: expected unqualified-id before ‘else’
   17 |         else
      |         ^~~~
foo.cc:19:37: error: ‘max’ does not name a type
   19 |                         centre=a;   max=b;
      |                                     ^~~
foo.cc:20:13: error: expected unqualified-id before ‘else’
   20 |             else
      |             ^~~~
foo.cc:22:45: error: ‘max’ does not name a type
   22 |                                 cenrte=c;   max=b;
      |                                             ^~~
foo.cc:23:17: error: expected unqualified-id before ‘else’
   23 |                 else
      |                 ^~~~
foo.cc:24:45: error: ‘max’ does not name a type
   24 |                                 centre=b;   max=c;
      |                                             ^~~
foo.cc:25:9: error: ‘cout’ does not name a type
   25 |         cout<<centre<<" "<<max<<endl;
      |         ^~~~
foo.cc:26:9: error: expected unqualified-id before ‘return’
   26 |         return 0;
      |         ^~~~~~
foo.cc:27:1: error: expected declaration before ‘}’ token
   27 | }
      | ^

信息

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