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 : Custom Appliances
Next, we will allow the user to enter up to 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 custom appliances. For
each appliance, you will have to enter its Wattage and hours used per day.
Question : Do you want to add an appliance:
Prompt: Would you like to add a custom appliance? YN
Valid input range: Y or N must be caseinsensitive.
Invalid response message: You must choose Y or N
Question : The Wattage of their custom appliance:
Prompt: Enter the approximate electricity usage of your appliance, in Watts:
Valid input range: Any nonnegative integer.
Invalid response message: Wattage of appliance must be above
Question : The hours the custom appliance is on
Prompt: Approximately how many hours is your appliance on each day?
Valid input range: Between and inclusive.
Invalid response message: Hours per day must be between and inclusive.
You must repeat questions until the user enters N for question indicating they do
not want to add another appliance up to 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
