#include <iostream>
using namespace std;
int main() {
int arr[5];
int *p = arr;
for (int i = 0;i < 5; i++) {
cin >> arr[i];
}
int temp = *p;
*p = *(p+4);
*(p+4) = temp;
for (int i = 0; i < 5;i++ ) {
cout << arr[i] <<endl;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: