View Code of Problem 90

#include <iostream>
#include <string>
using namespace std;
int main(){
	int x,y;
	int	a[100000]={0};
	for(int i=0;i<100000;i++){
		a[i]=i*i;
	}  
	scanf("%d,%d",&x,&y);
	for(int i=x;i<=y;i++){
		 for(int j=i+1;j<=y;j++)
		 	for(int t=j+1;t<=y;t++){
		 		if(a[i]+a[j]==a[t]){
		 			cout<<i<<"^2+"<<j<<"^2="<<t<<"^2"<<endl; 
				 } 
			 }
	}
}

Double click to view unformatted code.


Back to problem 90