Codersindex.com
Top coders sites |
- Title
- Coders Index | Learn How To Code - Coding Challenges To Sharpen Your Skills
- Meta Description
- Description The purpose of this challenge is to use a DO-WHILE loop while also using constants and accumulators. This challenge implements a menu system and simulates a food ordering scenario. Requirements Declare a double const called MAIN_ENTREE and initialize this to 4.99 Declare a double const called SIDE_ITEM and initialize this to 0.99 Declare a double const called DRINK_REG and initialize this to 1.99 Declare a double const called DRINK_LARGE and initialize this to 2.49 Within a do-while statement, display to the user a menu of choices where the user can select food items, something similar to below. If you're feeling creative, you can change the names of the food items 1 - Main Entree - Burrito 2 - Side Item - Taco 3 - Side Item - Flauta (EXTRA CREDIT A) 4 - Regular drink 5 - Large drink S - Start over (EXTRA CREDIT B) C - Check out You can use an IF-ELSE-IF or a SWITCH statement to implement the various menu selections. The user can ...
- Meta Keywords
- Technologies in use
- WordPress, jQuery, twemoji