+ 1

How does the function returns 11?

Java https://code.sololearn.com/c3X10t2XQp6w/?ref=app

12th Jul 2021, 3:02 PM
alagammai uma
alagammai uma - avatar
2 ответов
+ 2
a=2 b=6 c=2 In loop c+=c => c=c+c c=2+2=4 c++ => c=c+1 c=5 In loop c=c+c c=5+5=10 c++ => c=c+1 c=10+1=11 c<b false exit from loop return c //c=11
12th Jul 2021, 3:25 PM
Vadivelan
0
Vadivelan thank you
12th Jul 2021, 3:26 PM
alagammai uma
alagammai uma - avatar