foo.cc: In function 'int main()':
foo.cc:19:17: error: 'cout' was not declared in this scope
19 | cout<<"请输入要验证的偶数(该数>=6):";
| ^~~~
foo.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
2 | #include<cmath>
+++ |+#include <iostream>
3 | using namespace std;
foo.cc:20:17: error: 'cin' was not declared in this scope
20 | cin>>a;
| ^~~
foo.cc:20:17: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:45:55: error: 'endl' was not declared in this scope
45 | cout<<endl;//每4个换行
| ^~~~
foo.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
2 | #include<cmath>
+++ |+#include <ostream>
3 | using namespace std;
foo.cc: In function 'bool shushu(int)':
foo.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
15 | } //判断质数的函数
| ^
[Hydro](https://hydro.ac)提供评测服务