记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a;
      |         ^~~
foo.cc:7:12: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
    7 |         if(a%2==0;
      |            ^
foo.cc:7:15: warning: statement has no effect [-Wunused-value]
    7 |         if(a%2==0;
      |            ~~~^~~
foo.cc:8:18: error: expected ')' before ';' token
    8 |            a%3==0;
      |                  ^
      |                  )
foo.cc:7:11: note: to match this '('
    7 |         if(a%2==0;
      |           ^
foo.cc:7:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    7 |         if(a%2==0;
      |         ^~
foo.cc:9:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    9 |            a%5==0;
      |            ^
foo.cc:9:15: warning: statement has no effect [-Wunused-value]
    9 |            a%5==0;
      |            ~~~^~~
foo.cc:10:15: warning: statement has no effect [-Wunused-value]
   10 |            a%7==0;)
      |            ~~~^~~
foo.cc:10:19: error: expected primary-expression before ')' token
   10 |            a%7==0;)
      |                   ^
foo.cc:14:9: error: 'else' without a previous 'if'
   14 |         else
      |         ^~~~
foo.cc:16:17: error: 'cout' was not declared in this scope
   16 |                 cout<<"No"<<endl;
      |                 ^~~~
foo.cc:16:29: error: 'endl' was not declared in this scope
   16 |                 cout<<"No"<<endl;
      |                             ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-2 素数专题:素数判断
比赛
2023年新生赛(第一场)
语言
C++
递交时间
2023-08-15 17:11:24
评测时间
2023-08-15 17:11:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes