Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions