Recursion

From Progzoo
Revision as of 16:47, 9 February 2012 by Andr3w (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

http://javabat.com/java has an excellent range of recursion problems. Why duplicate?

4) At McDonalds one can buy chicken nuggets in packages containing 6, 9 or 20 pieces. Write a function that accepts an integer, num, as an argument and decides whether or not it is possible to buy num nuggets at McDonalds.


Taken from: John Guttag, course materials for 6.00 Introduction to Computer Science and Programming, Fall 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on 5 Nov 2008

[Font] [Default] [Show] [Resize] [History] [Profile]