View Code of Problem 90

#include <cstdio>
#include <iostream>

using namespace std;

int main(){
	int a,b;
	scanf("%d,%d",&a,&b);
	for(int i=a;i<=b;i++){
		for(int j=a;j<=b;j++){
			for(int k=a;k<=b;k++){
				if(((i*i+j*j)==k*k)&&i<=j) 
					printf("%d^2+%d^2=%d^2\n",i,j,k);
			}
		} 
			
	}
	return 0;
} 

Double click to view unformatted code.


Back to problem 90