This preview shows page 1. Sign up to view the full content.
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

Click to edit the document details