foo.cc: In function 'int main()':
foo.cc:7:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (x<1);
^~
foo.cc:8:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
{
^
foo.cc:11:3: error: 'else' without a previous 'if'
else if(x<10)
^~~~
foo.cc:12:3: error: expected primary-expression before '}' token
}
^
foo.cc:15:5: error: 'else' without a previous 'if'
else if(x<15)
^~~~
foo.cc:17:6: error: expected '}' before 'else'
else if(x<30)
^~~~
foo.cc:18:5: error: expected primary-expression before '}' token
}
^
foo.cc:21:2: error: 'else' without a previous 'if'
else
^~~~
[Hydro](https://hydro.ac)提供评测服务