#include <iostream>
using namespace std;

void INVERSIONE(int arr[]);

int main(void) {
	int arr[4];
	int i;
	
	arr[0] = 5;
	arr[1] = 13;
	arr[2] = -2;
	arr[3] = 8;
	
	cout << "Prima: ";
	
	for (i = 0; i < 4; i++) {
		cout << arr[i] << " ";
	}
	
	cout << endl;
	
	cout << "Dopo: ";
	
	INVERSIONE(arr);
	
	for (i = 0; i < 4; i++) {
		cout << arr[i] << " ";
	}
	
	cout << endl;
	
	return 0;
}

void INVERSIONE(int arr[]) {
	int temp = arr[0];
	arr[0] = arr[3];
	arr[3] = temp;
	
	temp = arr[1];
	arr[1] = arr[2];
	arr[2] = temp;
}