using namespace std; #include void reverse(int arr[], int n){ int first = 0, last = n-1; while(first < last){ int a = arr[first]; arr[first] = arr[last]; arr[last]= a; first++; last--; } for (int i = 0; i < n; i++) { cout<