Saved Bookmarks
| 1. |
Write a program to print the prime numbers less than 100 |
|
Answer» include using namespace std; int main() { int i,j= 4; cout<<"The prime numbers less than 100 is given below\n2,3,"; while(i<=100) { for(i=2;i<=j/2;i++) if(j%i==0) break; if(i==j/2+10) cout<<j<<"'"; j++; } } |
|