fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int a, b;
  5. int c, d;
  6.  
  7. void read(int &x, int &y) {
  8. cin >> x >> y;
  9. }
  10.  
  11. void stupid_read(int x, int y) {
  12. cin >> x >> y;
  13. }
  14.  
  15. int main() {
  16. read(a, b);
  17. stupid_read(c, d);
  18. cout << a << " " << b << endl;
  19. cout << c << " " << d << endl;
  20. }
Success #stdin #stdout 0s 4376KB
stdin
1 2
3 4
stdout
1 2
0 0