35657

Untitled

Nov 2nd, 2023
668
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.  
  6. int main() {
  7.  
  8.     setlocale(LC_ALL, "ru");
  9.  
  10.     int number;
  11.     int result = 0;
  12.  
  13.     for (int i = 0; i < 9; i++) {
  14.         cout << "Введите 0 или 1: ";
  15.         cin >> number;
  16.         result += number;
  17.     }
  18.  
  19.     if (result % 2 == 0) {
  20.         cout << "Положительное решение" << endl;
  21.     }
  22.     else {
  23.         cout << "Отрицательное решение" << endl;
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment