View Code of Problem 90

#include<stdio.h>
#include <string.h>
#include <math.h>
int main(){
	int a,b;
	int i,j,k;
	scanf("%d%d",&a,&b);
	if(a>b){
		a=k;
		a=b;
		b=k;
	}
	for(i=a;i<=b;i++){
		for(j=i;j<=b;j++){
			for(k=j;k<=b;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.


Back to problem 90