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