D.cpp 273 B

123456789101112131415161718
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. long long a[101];
  6. long long t;
  7. int i=0;
  8. while(cin>>t&&t!=0){
  9. a[i++]=t;
  10. }
  11. i--;
  12. for(;i>0;i--){
  13. cout<<a[i]<<" ";
  14. }
  15. cout<<a[0]<<endl;
  16. return 0;
  17. }