please figure out error in my code as test fails shown on my screen
Test error after submission
#include
using namespace std;
int main() {
int number;
cin>> number;
bool flag = 0;
for(int i = number + 1; i <= number*number; i++){
for(int j = i+ 1; j <= number*number; j++){
if((number*number) + (i*i) == (j*j)){
cout<<i<<' '<<j<<endl;
flag = 1;
break;
}
}
if(flag) break;
}
if(flag == 0) cout<< -1<<endl;
return 0;
}
this is my code please check it
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.