Unformatted text preview: Although it's not necessary, you may make your menu function so that it continues to reprompt the user until they enter a valid menu entry. Sample Run (User input in bold and italics) Please select one of the following menu options: 1) Calculate a Fibonacci number. 2) Calculate a factorial. 3) Quit 1 What Fibonacci number do you want to calculate? 8 The 8 Fibonacci number is 21. Please select one of the following menu options: 1) Calculate a Fibonacci number. 2) Calculate a factorial. 3) Quit 2 What factorial do you want to calculate? 7 7! = 5040. Please select one of the following menu options: 1) Calculate a Fibonacci number. 2) Calculate a factorial. 3) Quit 3...
View
Full Document
 Spring '08
 Guha
 Recurrence relation, Fibonacci number, Golden ratio

Click to edit the document details