0
Explain pls the output of this code
public static void main(String[] args){ System.out.println(f(3)); } public static int f(int x){ if(x==0){ return 2; }else{ return 1+f(x-1); } } The output is 5.
3 Answers
+ 2
Read the comments
https://code.sololearn.com/cla838D4eZKZ/?ref=app
+ 1
cyk thankyou. that was useful š
0
ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć thankyou for your help š