# Answer to Question #68754 in Functional Programming for Oleg

Question #68754

g(0, Y, Y):- !.

g(X, C, R):- Y is X - 1, C1 is C * 2, g(Y, C1, R).

What is the final value of Y after g(3, 2, Y)?

g(X, C, R):- Y is X - 1, C1 is C * 2, g(Y, C1, R).

What is the final value of Y after g(3, 2, Y)?

Expert's answer

The result is:

Y = 16.

Y = 16.

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

Oleg12.06.17, 23:28Yes, it is true. Thank you!

## Leave a comment