sir i have shared link of my code
please tell me where did i made mistake
Pythagoras triplet doubt
i checked your code from submission
use these simple conditions
if(x<3)cout<<"-1";
else if(x%2==0){
cout<<((x*x)/4)-1<<" ";
cout<<((x*x)/4)+1<<endl;
}
else{
cout<<(x*x-1)/2<<" ";
cout<<(x*x+1)/2<<endl;
}
Complete Code
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.