Answers needed!
The following function finds the sixth power of 2 i.e. 64
Choose the correct option to fill in the blanks on lines 4 and 7.
function power (n){
if(n>1){
n=n-1
return ___
}
else {
return ___
}
print (power(6))
OPTIONS:
(a) line no.4: 2*power(n); line no.7: 2
(b) line no.4: 6*power(n); line no.7: 6
(c) line no.4: n*n; line no.7: 2
(d) line no.4: 6*power(n); line no.7: 2
Answers
Answered by
2
Answer:
line no.4: 6*power(n); line no.7: 6
Similar questions