Ask
your own question, for FREE!
Mathematics
38 Online
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) = (b) What happens if you try to compute Crunch(−24)? What does this suggest about an appropriate precondition for this function?
Still Need Help?
Join the QuestionCove community and study together with friends!
this might be a bit difficult to answer if you're not familiar with basic coding, but when you plug 5 into the function, check the "if" condition to see if 5 satisfies the condition, otherwise, move to the "else" statement, then report the value that is ~returned~ by the function
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
penguin:
Running, running far away. Escaping dreams of yesterday. Faster, faster there I go.
penguin:
The hardest thing I'll ever do Is let go of you And look forward instead of back at my past.
penguin:
The hardest thing I'll ever do Is let go of you And look forward instead of back at my past.
penguin:
The hardest thing I'll ever do Is let go of you And look forward instead of back at my past.
seeker:
I once believed that if you exist, then grace itself exists, if you remain in my thoughts, what power has sorrow or poison over me? From your face, all the
unknownnnnnn:
The Space Between Breaths... Night doesnu2019t rush me. It waits. Like it knows Iu2019ll eventually start thinking about everything I almost said and the th
676767:
If words could paint the blush I feel inside, I'd write a sonnet just to tell you trueu2014 How every glance you cast, each smile you hide, Ignites a secret
forgetmylife:
Crown of the outcast A silhouette in a crowded room, The brightest light, the deepest gloom.
1 hour ago
2 Replies
1 Medal
2 hours ago
0 Replies
0 Medals
2 hours ago
0 Replies
0 Medals
2 hours ago
0 Replies
0 Medals
3 hours ago
19 Replies
0 Medals
3 hours ago
1 Reply
0 Medals
4 hours ago
6 Replies
0 Medals
9 hours ago
4 Replies
2 Medals