Question: Practice iteration ( the loop ) . In a WHILE loop, print out this menu of Book Categories: Science Fiction Computers and Technology Cooking Business

Practice iteration (the loop). In a WHILE loop, print out this menu of Book Categories:
Science Fiction
Computers and Technology
Cooking
Business
Comics
Exit
Then, ask the user to select one of the items in the menu (The user should enter an integer between 1 and 6. Any other input should print an error message and return to the user input). Based on the users choice, the output should be the book category related to the numerical choice, and maybe a complimentary message (e.g.,You selected Cooking. Cooking is a yummy choice). After the category and message are displayed, the program should return the user to another opportunity to select from the menu. The loop should end only when the user selects number 6.
Write a program in R that uses the above requirements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!