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
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
Get step-by-step solutions from verified subject matter experts
