35657

Untitled

Feb 3rd, 2024
958
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     setlocale(LC_ALL, "ru");
  8.  
  9.     int number;
  10.     int result = 0;
  11.  
  12.     for (int i = 0; i < 9; i++) {
  13.         cout << "Введите 0 или 1: ";
  14.         cin >> number;
  15.         result += number;
  16.     }
  17.  
  18.     if (result % 2 == 0) {
  19.         cout << "Положительное решение" << endl;
  20.     }
  21.     else {
  22.         cout << "Отрицательное решение" << endl;
  23.     }
  24.  
  25.    
  26. }
Advertisement
Add Comment
Please, Sign In to add comment