contestada

Consider the following pseudocode function. function Crunch(x is in R) if x ≥ 100 then return x/100 else return x + Crunch(10 · x) (a) Compute Crunch(5). Crunch(5) =

Respuesta :

caylus
Hello,

Let call f(x)= Crunch(x)[tex]f(5)=5+f(10*5)=5+f(50)\\\\ f(50)=50+f(10*50)=50+f(500)=50+5=55\\\\ f(5)=5+f(50)=5+55\\\\ \boxed{f(5)=60}[/tex]