Загрузка данных


#include <iostream>
#include <windows.h>
#include <clocale>
using namespace std;

int main() {
    SetConsoleCP(1251);
    SetConsoleOutputCP(1251);
    setlocale(LC_ALL, "Russian");

    cout << "Тройки x, y, z от 1 до 20, для которых x*x + y*y = z*z:\n";

    for (int x = 1; x <= 20; x++) {
        for (int y = 1; y <= 20; y++) {
            for (int z = 1; z <= 20; z++) {
                if (x * x + y * y == z * z) {
                    cout << "x = " << x << ", y = " << y << ", z = " << z << endl;
                }
            }
        }
    }

    return 0;
}