Compile Error

foo.cc:13:21: warning: missing terminating " character
   13 | if(x%2 == 0) printf("%d是偶数
      |                     ^
foo.cc:13:21: error: missing terminating " character
   13 | if(x%2 == 0) printf("%d是偶数
      |                     ^~~~~~~~~~~~
foo.cc:15:13: warning: missing terminating " character
   15 | else printf("%d是奇数
      |             ^
foo.cc:15:13: error: missing terminating " character
   15 | else printf("%d是奇数
      |             ^~~~~~~~~~~~
foo.cc:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      |      ^
foo.cc: In function 'int main()':
foo.cc:15:1: error: expected primary-expression before 'else'
   15 | else printf("%d是奇数
      | ^~~~
foo.cc:11:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   11 | scanf("%d",&x);
      | ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1013 判断奇偶数
语言
C++
递交时间
2022-07-10 13:22:31
评测时间
2022-07-10 13:22:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes