Problem prime
User yuzhe
Submission Time 2026-07-25 23:24:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘int main()’:
prime.cpp:4:9: error: ‘cin’ was not declared in this scope
4 | int a; cin >> a;
| ^~~
prime.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | using namespace std;
prime.cpp:8:9: error: ‘cout’ was not declared in this scope
8 | cout<<"Not Prime";
| ^~~~
prime.cpp:8:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
prime.cpp:20:9: error: ‘cout’ was not declared in this scope
20 | cout<<"Prime";
| ^~~~
prime.cpp:20:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
prime.cpp:22:10: error: ‘cout’ was not declared in this scope
22 | else cout<<" Not Prime";
| ^~~~
prim