foo.cc:1:5: error: 'cin' does not name a type
cin >> x;
^~~
foo.cc:4:13: error: expected unqualified-id before 'if'
if (x<1)
^~
foo.cc:7:13: error: expected unqualified-id before 'else'
else if (1<=x && x<10)
^~~~
foo.cc:10:13: error: expected unqualified-id before 'else'
else if (10<=x && x<15)
^~~~
foo.cc:13:13: error: expected unqualified-id before 'else'
else if (15<=x && x<30)
^~~~
foo.cc:16:13: error: expected unqualified-id before 'else'
else
^~~~
foo.cc:18:13: error: 'cout' does not name a type
cout << y;
^~~~
foo.cc:20:5: error: expected unqualified-id before 'return'
return 0;
^~~~~~
foo.cc:21:1: error: expected declaration before '}' token
}
^
[Hydro](https://hydro.ac)提供评测服务