View Code of Problem 90

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<climits>

using namespace std;


int main()
{
	int a, b;
	cin >> a;
	getchar();
	cin >> b;

	for (int x = a; x <= b; x++) {

		for (int y = x; y <= b; y++) {

			for (int z = a; z <= b; z++) {

				if (x * x + y * y == z * z)
					cout << x << "^2+" << y << "^2=" << z << "^2" << endl;
			}
		}
	}
}

Double click to view unformatted code.


Back to problem 90