#include<iostream>
using namespace std;int main(){ int N; int *arr; cout << "enter size of arr(enter N) : "; cin >> N; arr = new int [N]; for(int i = 1; i <= N;i++) cin >> arr[i]; cout << "your arr : "; for(int i = 1; i <= N;i++) cout << arr[i] << " " ;
cout << "new arr : "; for(int i = N; i > 0;i--) cout << arr[i] << " " ;
cout << "new2 arr : "; for(int i = 1; i <= N;i++) { if((i % 2) == 0) cout << arr[i] << " " ; }}
#include<iostream>
using namespace std;
int main(){
int N;
int *arr;
cout << "enter size of arr(enter N) : ";
cin >> N;
arr = new int [N];
for(int i = 1; i <= N;i++)
cin >> arr[i];
cout << "your arr : ";
for(int i = 1; i <= N;i++)
cout << arr[i] << " " ;
cout << "new arr : ";
for(int i = N; i > 0;i--)
cout << arr[i] << " " ;
cout << "new2 arr : ";
for(int i = 1; i <= N;i++)
{
if((i % 2) == 0)
cout << arr[i] << " " ;
}
}