Advertisement
medajibka

3.7

Apr 18th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int a, b;
  6.  
  7. void input() {
  8.     cout << "Enter a: ";
  9.     cin >> a;
  10.     cout << "Enter b: ";
  11.     cin >> b;
  12. }
  13.  
  14. void arithmometer(int a, int b) {
  15.     if (a == 0 & b == 0) {
  16.         exit(0);
  17.     } else {
  18.         cout << a * b << endl;
  19.     }
  20. }
  21.  
  22. int main() {
  23.  
  24.     while (true) {
  25.         input();
  26.         arithmometer(a, b);
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement