Question: How to use switch statement for this question Part 1: If else practice Write a program to monitor user's soda intake. - Create an integer

How to use switch statement for this question
How to use switch statement for this question Part 1: If else

Part 1: If else practice Write a program to monitor user's soda intake. - Create an integer variable and assign it a random value between 0 to 9 . This integer represents the number of soda bottles consumed by the user in the prior week. - If the user consumed at most 1 bottle, print "You did well this weekl". - Otherwise, if the user consumed more than 1 but less than 5, print "You need to work on reducing your calorie intake". - Otherwise, if the user consumed more than 4 but less than 8, print "Too much soda!". - Otherwise, if the user consumed more than 7, print "You have bought a one-way ticket...to island of diabetes

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 Databases Questions!