View Code of Problem 90

#include<stdio.h>
int main(){
	int a,b;
	scanf("%d,%d",&a,&b);
	int max=a>b?a:b;
	int min=a>b?b:a;
	for(int i=min;i<=max;i++){
		for(int j=i;j<=max;j++){
			for(int k=j;k<=max;k++){
				if(i*i+j*j==k*k){
		printf("%d^2+%d^2=%d^2\n",i,j,k);
				}
			}
		}
	}
}

Double click to view unformatted code.


Back to problem 90