#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cout << "Enter the number of elements: ";
cin >> n;
vector<int> arr(n);
cout << "Enter " << n << " integers: ";
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
cout << "Reversed array: ";
// Normal loop printing in reverse order
for (int i = n - 1; i >= 0; i--) {
cout << arr[i] << " ";
}
cout << endl;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: