0
What does h(19685)return for the following function definition?
4 Respuestas
+ 2
10
+ 2
d=1 and n=0
while loop begins
1<19685
d=3,n=1
3<19685
d=9,n=2
9<19685
d=27,n=3
27<19685
d=81,n=4
81<19685
d=243,n=5
243<19685
d=729,n=6
729<19685
d=2187,n=7
2187<19685
d=6561,n=8
6561<19685
d=19683,n=9
19683<19685
d=59049,n=10
Now 59049 is not less than 19685
So the loop terminates and n=10
+ 1
Why don't you just try to print h(19685)?
0
Tqq soo much