Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using C only Write a microwave controller program that will take as input the time to cook something and the power level (1 to 100).

using C only

image text in transcribed

Write a microwave controller program that will take as input the time to cook something and the power level (1 to 100). Assume that you have the ability to add a time delay so that every iteration of the loop takes 1 second (your program does not need to add the delay -just assume that this could be added to your program). Your program should decrement the timer every iteration of the loop and display the remaining time. When the timer reaches half of the cooking time it should cut the power to 1/2 and display the new power level. When the timer reaches zero, your program should ring the bell ('\a' character) and display a message such as "Your food is ready!" If the user enters a cooking time value less than 0, ring the bell and ask them to enter a correct value. Don't proceed until a correct value has been entered. If the user enters a power level out of range, ring the bell and ask them to enter a correct value. Don't proceed until a correct value has been entered. Sample output (doesn't have to be identical). Make sure to fully test your code and submit any necessary screen shots

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago