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