Untitled
unknown
plain_text
2 years ago
459 B
4
Indexable
#include <iostream> #include <vector> int main() { int N; std::cout << "Введите размер массива (нечетное число): "; std::cin >> N; std::vector<int> A(N); std::cout << "Введите элементы массива:\n"; for (int i = 0; i < N; i++) { std::cin >> A[i]; } for (int i = N - 1; i >= 0; i -= 2) { std::cout << A[i] << " "; } return 0; }
Editor is loading...
Leave a Comment