int FindLast(int* arr, int n) { for (int i = n - 1; i >= 0; i--) { if (arr[i] % 2 != 0) { return i; } } return -1; }