#include<stdio.h> int main() { int low,high; scanf("%d,%d",&low,&high); int i,j,k; for(i=low;i<=high;i++) for(j=i;j<=high;j++) for(k=j;k<=high;k++) { if((i*i+j*j)==k*k) printf("%d^2+%d^2=%d^2\n",i,j,k); } return 0; } |
Double click to view unformatted code.