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


#include <iostream>
using namespace std;

int main() {
    int sumFor = 0, sumWhile = 0, sumDoWhile = 0;
    
    for (int x = -40; x <= 100; x++) {
        if (x > 0 && x % 2 == 0) {
            sumFor += x * x;
        }
    }
    
    int x = -40;
    while (x <= 100) {
        if (x > 0 && x % 2 == 0) {
            sumWhile += x * x;
        }
        x++;
    }
    
    x = -40;
    do {
        if (x > 0 && x % 2 == 0) {
            sumDoWhile += x * x;
        }
        x++;
    } while (x <= 100);
    
    cout << sumFor << endl;
    cout << sumWhile << endl;
    cout << sumDoWhile << endl;
    
    return 0;
}