View Code of Problem 90

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
int main()
{
	int m, n;
	scanf("%d,%d", &m, &n);
	for (int i = m; i <= n; i++) {
		for (int j = i+1; j <= n; j++) {
			for (int k = j+1; k <= n; k++) {
				if ((i*i + j * j) == k * k) {
					cout << i << "^2+" << j << "^2=" << k << "^2"<<endl;
				}
			}
		}
	}

}

Double click to view unformatted code.


Back to problem 90