记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:10:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   10 |                 if(b>c)
      |                 ^~
foo.cc:12:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   12 |                         mid=b;
      |                         ^~~
foo.cc:14:17: error: ‘else’ without a previous ‘if’
   14 |                 else
      |                 ^~~~
foo.cc:15:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   15 |                         if(a>c)
      |                         ^~
foo.cc:17:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   17 |                                 mid=c;
      |                                 ^~~
foo.cc:18:25: error: ‘else’ without a previous ‘if’
   18 |                         else
      |                         ^~~~
foo.cc:22:9: error: ‘else’ without a previous ‘if’
   22 |         else
      |         ^~~~
foo.cc:23:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   23 |                 if(a>c)
      |                 ^~
foo.cc:25:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   25 |                         mid=a
      |                         ^~~
foo.cc:25:30: error: expected ‘;’ before ‘else’
   25 |                         mid=a
      |                              ^
      |                              ;
   26 |                 else
      |                 ~~~~          
foo.cc:30:25: error: ‘else’ without a previous ‘if’
   30 |                         else
      |                         ^~~~
foo.cc:33:34: error: expected ‘;’ before ‘return’
   33 |         cout<<mid<<" "<<max<<endl
      |                                  ^
      |                                  ;
   34 |         return 0;
      |         ~~~~~~                    

信息

递交者
类型
自测
题目
A1-2 分支结构练习:三数的特征值
语言
C++
递交时间
2024-08-15 14:04:51
评测时间
2024-08-15 14:04:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes