What does the following function do? int fun(int x, int y) { if (y == 0) return 0; return (x + fun(x, y-1)); }
What does the following function do?
int fun(int x, int y) {
if (y == 0) return 0;
return (x + fun(x, y-1));
}From the Combined Bank Assistant Programmer (CSE) March 2021 – Preliminary exam, question 17 of 86.