SyntaxFix
Write A Post
Hire A Developer
Questions
This is my very simple c++ program to list down the prime numbers in between 2 and 100.
for(int j=2;j<=100;++j) { int i=2; for(;i<=j-1;i++) { if(j%i == 0) break; } if(i==j && i != 2) cout<<j<<endl; }