View Code of Problem 90

#include <iostream>
#include <math.h>
using namespace std;

int main(){
    int n,m;
    cin>>n>>m;
    for (int i = n; i <= m; ++i) {
        for (int j = i; j <= m; ++j) {
            int sum= i * i + j * j;
            for (int k = j; k <=m; ++k) {
                if (k*k==sum){
                    cout<<i<<"^2+"<<j<<"^2="<<k<<"^2"<<endl;
                    break;
                }
            }

        }
    }

    return 0;
}

Double click to view unformatted code.


Back to problem 90