记录详情

Compile Error

foo.cc:17:42: warning: missing terminating " character
   17 |                                 cout<<i<<";
      |                                          ^
foo.cc:17:42: error: missing terminating " character
   17 |                                 cout<<i<<";
      |                                          ^~
foo.cc: In function 'int main()':
foo.cc:5:22: error: expected ';' before ')' token
    5 |     int i,j,k,MAX;i++)
      |                      ^
      |                      ;
foo.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>MAX;
      |         ^~~
foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
foo.cc:17:33: error: 'cout' was not declared in this scope
   17 |                                 cout<<i<<";
      |                                 ^~~~
foo.cc:17:33: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:18:25: error: expected primary-expression before '}' token
   18 |                         }
      |                         ^
foo.cc:20:17: error: 'cout' was not declared in this scope
   20 |                 cout<<end1;
      |                 ^~~~
foo.cc:20:17: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:20:23: error: 'end1' was not declared in this scope
   20 |                 cout<<end1;
      |                       ^~~~
foo.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
foo.cc:4:1: note: to match this '{'
    4 | {
      | ^
foo.cc:5:13: warning: unused variable 'k' [-Wunused-variable]
    5 |     int i,j,k,MAX;i++)
      |             ^
[Hydro](https://hydro.ac)提供评测服务

信息

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