fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int a[105], i;
  4. int main(){
  5. while(cin >>a[i]){
  6. i++;
  7. }
  8. for(int j = i-1;j >= 0; j--){
  9. cout << a[j] << endl;
  10. }
  11. }
  12. /*
  13.   mADIK chort
  14. */
  15.  
Success #stdin #stdout 0.01s 5292KB
stdin
123
456
789
987
654
321
0
stdout
0
321
654
987
789
456
123