fork(3) download
  1. #include <iostream>
  2. using namespace std;
  3. int a[10000];
  4. int main(){
  5.  
  6. int x = 0;
  7. int f;
  8. while(cin >> f) {
  9.  
  10. a[x] = f;
  11. x++;
  12. }
  13. for (int i = x - 1; i >= 0;i--){
  14. cout << a[x] << " ";
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
Standard output is empty