Advertisement
fryc1906

93

Apr 5th, 2016
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main(){
  6.     for(int i=1;i<101;i++){
  7.         for(int j=i;j>=1;j--){
  8.             //cout<<i<<" "<<j<<" "<<i%j<<endl;
  9.             if(i%j==0&&i!=j){
  10.                 break;
  11.             }
  12.             if(j==2){
  13.                 cout<<i<<endl;
  14.             }
  15.         }
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement