#include<bits/stdc++.h> using namespace std; int main(void) { int a,b,x,y; double z; scanf("%d,%d",&a,&b); for(x=a;x<b;++x) for(y=x;y<b;++y) { z=sqrt(x*x+y*y); if(z==int(z)&&z<=b) cout<<x<<"^2+"<<y<<"^2="<<z<<"^2"<<endl; } } |
Double click to view unformatted code.