fork download
  1. #include <iostream>
  2.  
  3. using std::cin;
  4. using std::cout;
  5.  
  6. int main()
  7. {
  8. char ch = 'x';
  9.  
  10. int a = 0, b = 0;
  11.  
  12.  
  13. while( ch != '|')
  14. {
  15. cout << "First number: ";
  16. cin >> a;
  17.  
  18. cout << "Second number: ";
  19. cin >> b;
  20.  
  21. cout << a << '\t' << b << '\n';
  22.  
  23. cout << "Where to now? ";
  24. cin >> ch;
  25.  
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0s 3416KB
stdin
300 356 74 10 |
stdout
First number: Second number: 300	356
Where to now? First number: Second number: 4	10
Where to now?