Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- unsigned long p,a,b,c;
- cout<<"p=";cin>>p;
- for (a=1;a<p-2;a++)
- for (b=1;b<p-2;b++)
- {
- c=p-a-b;
- if (a+b>c&&c+b>a&&a+c>b)
- cout<<a<<" "<<b<<" "<<c<<endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment