#include<bits/stdc++.h> using namespace std; int main() { int a,b; scanf("%d,%d",&a,&b); for(int i=a;i<=b;i++){ for(int j=i+1;j<=b;j++){ for(int k=j+1;k<=b;k++){ if(i*i+j*j==k*k){ cout<<i<<"^2+"<<j<<"^2="<<k<<"^2"<<endl; } } } } return 0; } |
Double click to view unformatted code.