Question: Please make a program using C language to solve this problem , you can use what is listed on the syllabus only , on the
Problem statement Write a C program to compute the total power (in Kilo Watts) and cost (in SAR) related to the power distributed to the pow power and cost of each recipient using the following formulas: Power (in Watts)-I (current in Amps) X V (voltage in Volts) er recipients from a power station. Your program will compute the You will need to use the following table that is taken from the Electricity Company, in order to compute the cost for computing electricity consumed by variant recipients Private educational facilities, private (Halalah /kwh) (Halalah /kwh) (Halalah /kwh) Halalah / kowh)(Halalah/ kwh)medical facilities Halalah / kwh) 18 20 16 1-6000 32 13 18 More than 6000 30 30 20 The current and voltage values will be inserted by the user and they should be greater than zero. Otherwise, you will display an invalid input error message. Note that the power consumption in the Electricity Company table (above) is in Kilo Watts Hour (Kwh), and that you need not be concerned with the Hour part because the Kilo Watts are computed over the full period of one full month, and therefore, the hours are factored in the computation. In other words, you should just be concerned with computing how many Kilo Watts were consumed by a certain recipient. For example, if a house consumed 6000 Kilo Watts then they will pay 6000 0.18 1080 SAR If they consumed 7000 Kilo Watts then they will pay 1080+(1000 0.3)1380 SAR. Here are sample data that you need to use to run your program. should be general for any set size of data. Customer Recipient Voltage (volts) Current (Amps) Mall House Government University 110 Mosque Hyper Market Airport Private Hospital Remember that your program 220 220 220 240 240 220 2500 2880000 500 570000 12800000 99000 should be general for any number of recipients and should continue computing the Your program power and cost until the user inserts -1 for voltage or current. Once the program completes computing the power and cost for all recipients, it should display the following information
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
