Compile Error

foo.cc:6:2: error: expected initializer before 'int'
  int x;
  ^~~
foo.cc:7:2: error: 'cin' does not name a type
  cin>>x;
  ^~~
foo.cc:8:2: error: expected unqualified-id before 'if'
  if(o==x%2) 
  ^~
foo.cc:12:2: error: expected unqualified-id before 'else'
  else
  ^~~~
foo.cc:17:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
foo.cc:18:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1012 判断奇偶数
语言
C++
递交时间
2021-11-20 08:35:13
评测时间
2021-11-20 08:35:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes