Write 2 different programs using if statement and switch statement that presents the iser w/ a choice of 5 beverages (Coke, Water, Sprite, ... , and so on). Then allow the user to choose a beverage by entering a number 1-5. Dutput which beverage they chose. Sample Output: *Beverages**** 1- COKE 50 2- WATER 20 B- SPRITE 60 - ROYAL 50 5- MT.DEW Choose a beverage : tem name: ? tem price:? Amount: ? Amt. paid: 60 (assume that the amt paid is equal or higher than amount) - Change:
Write 2 different programs using if statement and switch statement that presents the iser w/ a choice of 5 beverages (Coke, Water, Sprite, ... , and so on). Then allow the user to choose a beverage by entering a number 1-5. Dutput which beverage they chose. Sample Output: *Beverages**** 1- COKE 50 2- WATER 20 B- SPRITE 60 - ROYAL 50 5- MT.DEW Choose a beverage : tem name: ? tem price:? Amount: ? Amt. paid: 60 (assume that the amt paid is equal or higher than amount) - Change:
Chapter2: Using Data
Section: Chapter Questions
Problem 2GZ
Related questions
Question
Using DEV C++
![Write 2 different programs using if statement and switch statement that presents the
user w/ a choice of 5 beverages (Coke, Water, Sprite, . , and so on).
Then allow the user to choose a beverage by entering a number 1-5.
Output which beverage they chose.
Sample Output:
*Beverages*
1- COKE
50
2- WATER
20
3- SPRITE
60
4- ROYAL
50
5- MT.DEW
60
Choose a beverage :
|
Item name: ?
Item price:?
Amount: ?
Amt. paid:_ (assume that the amt paid is equal or higher than amount)
-
Change:](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe6711bf2-3c1b-4281-9782-dcdc109a843a%2F02977864-aa64-4210-a837-234409791d54%2F8hvgcyu_processed.png&w=3840&q=75)
Transcribed Image Text:Write 2 different programs using if statement and switch statement that presents the
user w/ a choice of 5 beverages (Coke, Water, Sprite, . , and so on).
Then allow the user to choose a beverage by entering a number 1-5.
Output which beverage they chose.
Sample Output:
*Beverages*
1- COKE
50
2- WATER
20
3- SPRITE
60
4- ROYAL
50
5- MT.DEW
60
Choose a beverage :
|
Item name: ?
Item price:?
Amount: ?
Amt. paid:_ (assume that the amt paid is equal or higher than amount)
-
Change:
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 7 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,