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