Advertisement
askarulytarlan

Задача №69. Переставить элементы в обратном порядке

Oct 25th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int massive[100];
  10. int d;
  11. int positive = 0;
  12. int main(int argc, const char * argv[]) {
  13. cin >> d;
  14. for(int i = 1; i <= d; i++){
  15. cin >> massive[i];
  16. }
  17. for(int i = d; i >= 1; i--){
  18. cout << massive[i] << " ";
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement