#include<iostream> #include<vector> #include<string> #include <algorithm> #include <math.h> using namespace std; int main() { int m,n; scanf("%d,%d",&m,&n); for(int i=m; i<=n; i++){ for(int j=i; j<=n; j++){ for(int k=i; k<=n; k++){ if(pow(i,2) + pow(j,2) == pow(k,2)){ printf("%d^2+%d^2=%d^2\n",i,j,k); break; } } } } return 0; } |
Double click to view unformatted code.