Given the following: void fun(int x) { if(x<1) { out.print(x); else { out.print(
ID: 3608573 • Letter: G
Question
Given the following: void fun(int x) { if(x<1) { out.print(x); else { out.print(x); fun(x-1); } } a)What is output by the call fun(3)? b)What is output by the call fun(5)? Given the following: void fun(int x) { if(x<1) { out.print(x); else { out.print(x); else { out.print(x); fun(x-1); } } a)What is output by the call fun(3)? b)What is output by the call fun(5)? b)What is output by the call fun(5)?Explanation / Answer
void fun(int x) { if(x<1) { out.print(x);} //missing } above
else { out.print(x); else { out.print(x); fun(x-1); } }