Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void triplete(int n)
- {
- int d;
- for(d =1;d<=n/2;++d)
- if(n%d==0&&d<n/d)
- for(int i=0;i<(n/d-d)&&i<d;++i)
- cout<<'('<<i<<','<<d<<','<<n/d-i<<')'<<'\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement