fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4. int main()
  5. {
  6. int n=0,i;
  7.  
  8. // insert code here...
  9. cout << "Enter number of inputs\n";
  10. cin >> n;
  11.  
  12. vector<int> x(n);
  13. vector<int> y(n);
  14.  
  15. for (i=0;i<n;i++)
  16. {
  17. cin >> x[i];
  18. cin >> y[i];
  19. }
  20. //print x
  21. for ( i=0;i<n;i++)
  22. {
  23. cout << x[i];
  24. }
  25.  
  26. cout << "Test1";
  27.  
  28. //print y
  29. for ( i=0;i<n;i++)
  30. {
  31. cout << y[i];
  32. }
  33. }
Success #stdin #stdout 0s 3476KB
stdin
1
5
6
stdout
Enter number of inputs
5Test16