Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///BAC 2014 august SIII prb. 3
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int n,x,y,z;
- cin>>n;
- for(x=0;x<=n-2;x++){
- for(y=x+1;y<=n-1;y++){
- for(z=y+1;z<=n;z++){
- if(x*y + y*z == n){
- cout<<"("<<x<<","<<y<<","<<z<<")"<<endl;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement