View Code of Problem 90

#include<iostream>
#include<string>
#include<stdio.h>
#include<string.h>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int a=0,b=0,c=0;
	int n,m;
	scanf("%d,%d",&n,&m);
	if(n>m)
    swap(n,m);
	for(a=n;a<=m;a++)
		for(b=a;b<=m;b++)
			for(c=n;c<=m;c++)
				if(a*a+b*b==c*c)
				{
					printf("%d^2+%d^2=%d^2\n",a,b,c);
				}
				system("pause");
}

Double click to view unformatted code.


Back to problem 90