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