/*Convert the following method into a non recursive method, and include * a comment in plain English explaining what it does*/ #include int foo(int arr[], int x, int y, int z) { if (y >= x) { return z; } if (arr[y] % 2 == 0) { return foo(arr, x, y + 1, z + arr[y]); } return foo(arr, x, y + 1, z); } /*rewrite foo without using recursion*/ int main(void){ int testArr[] = {1, 2, 3, 4, 5, 6}; printf("%d\n",foo(testArr, 6, 0, 0)); }