View Code of Problem 90

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

Double click to view unformatted code.


Back to problem 90