Question: C language and use LOOPS please Keep it simple ( stdio.h ) ( math.h ) Heading Normal No Spacing Headi Problem statement Write a C
Heading Normal No Spacing Headi 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 power recipients from a power station. Your program will compute the power and cost of each recipient using the following formulas: Power (in watts)-1 (current in Amps)X V (voltage in Volts) 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: 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. Remember that your progranm should be general for any set size of data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
