View Code of Problem 90

#include<stdio.h>
#include<math.h>
int main(){
	int a,b,x,y,i,j;
	double k;
	scanf("%d,%d",&a,&b);
	for(i=a;i<=b;i++){
		for(j=i;j<=b;j++){
			k= sqrt(i*i+j*j);
			x = (int)k;
			if((k-x==0)&&x<=b){
				printf("%d^2+%d^2=%d^2\n",i,j,x);
			}
		}
	}

	
	return 0;
}

Double click to view unformatted code.


Back to problem 90