Advertisement
chevengur

Вводный курс: основы C++ | Урок 4: Логические операции: сравнение 2/3

Aug 22nd, 2023 (edited)
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int x, y, z;
  7.     std::cin >> x >> y >> z;
  8.     if ((x + y) != z) {
  9.         std::cout << "Error. The sum of " << x << " and " << y << " is " << x + y << std::endl;
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement