Advertisement
Guest User

zad17

a guest
Oct 19th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int a, b;
  7.     bool powtorzenie = false;
  8.     cin >> a;
  9.     cout << a << endl;
  10.     cin >> b;
  11.     if (a == b)
  12.         return 0;
  13.     else
  14.     {
  15.         cout << b << endl;
  16.         while (powtorzenie == false)
  17.         {
  18.             cin >> a;
  19.             cout << a << endl;
  20.             if (a == b)
  21.                 powtorzenie = true;
  22.             else
  23.             {
  24.                 cin >> b;
  25.                 if (a == b)
  26.                     powtorzenie = true;
  27.                 else
  28.                     cout << b;
  29.             }
  30.         }
  31.     }
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement