Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime calculator using bool
#include <iostream> using namespace std; int main() { int num; bool prime_num = true; cin>>num; for(int i =2;i < num; i++) { if(num%i==0) prime_num = false; } if(prime_num) cout<<"PRIME"<<endl; else cout<<"NOT PRIME"; }
run
|
edit
|
history
|
help
0
t>0
Easy String Reverse Example
VecScalMultiOpLaod
test
HeapSort
HCF
Sort array of 0's and 1's
Hello World - verbose
cppOverride
cotton farm 0.0.1.0