Assume the availability of a function named oneMore . This function receives an
ID: 3655815 • Letter: A
Question
Assume the availability of a function named oneMore . This function receives an integer and returns one more than its parameter. So, pass oneMore(12 ) and it will return 13. DO NOT DEFINE this function-- just assume it is available. YOUR TASK: write an expression whose value is 5 but in your expression you can only use the integer literal 0. You can not use anything with the digits 1-9 and you cannot use any arithmetic operators like +-*/. But you can use 0 and you can make calls to the function oneMore.Explanation / Answer
return oneMore( oneMore( oneMore( oneMore( oneMore( 0 ) ) ) ) );
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.