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