Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main(){
- for(int i=1;i<101;i++){
- for(int j=i;j>=1;j--){
- //cout<<i<<" "<<j<<" "<<i%j<<endl;
- if(i%j==0&&i!=j){
- break;
- }
- if(j==2){
- cout<<i<<endl;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement