Question: code this in C Section 4 : Custom Appliances Next, we will allow the user to enter up to 3 custom appliances. Introductory prompt: This

code this in C Section 4: Custom Appliances
Next, we will allow the user to enter up to 3 custom appliances.
Introductory prompt: This section will allow you to enter information about any
appliances not listed before. You will be able to enter up to 3 custom appliances. For
each appliance, you will have to enter its Wattage and hours used per day.
Question 1: Do you want to add an appliance:
Prompt: Would you like to add a custom appliance? Y/N
Valid input range: Y or N, must be case-insensitive.
Invalid response message: You must choose Y or N.
Question 2: The Wattage of their custom appliance:
Prompt: Enter the approximate electricity usage of your appliance, in Watts:
Valid input range: Any non-negative integer.
Invalid response message: Wattage of appliance must be above 0.
Question 3: The hours the custom appliance is on
Prompt: Approximately how many hours is your appliance on each day?
Valid input range: Between 0 and 24 inclusive.
Invalid response message: Hours per day must be between 0 and 24 inclusive.
You must repeat questions 1-3 until the user enters N for question 1, indicating they do
not want to add another appliance (up to 3 times). For each custom appliance, you must
be able to store the wattage and hours used. Using these values, you should be able to
calculate the energy consumption with the equation in the background section.

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