Question: Question 1 ( 4 5 points ) Write a program that computes a customer's monthly electricity bill.The bill includes a 1 0 ( Riyals )

Question 1(45 points)
Write a program that computes a customer's monthly electricity bill.The bill includes a 10(Riyals) monthly fee of meter, 15% added value rate on the total consumption cost, and plus the cost of electricity consumption per kilowatt/hour based on the New Electricity Tariffs for all categories of consumption.
The program asks the user to input customer's name, the bill actual number of days, amount of electricity consumption, and then the total cost of electricity consumption is calculated based on the following Consumption categories.
\table[[#,Consumption categories (per month),(Halalah / kwh)],[1,1 to 6000,18],[2,More than 6000,30]]
And by the following formulas (In case consumption exceeds consumption of first category):
Consumption of the first category = Actual number of days **600030
Consumption of the second category = Amount of electricity consumption - Consumption of the first category
Total consumption cost = Consumption of the first category **18100+ Consumption for the second category **30100
Tax = Total consumption cost ** Added value rate
Bill amount = Monthly fee of meter + Total consumption cost + Tax
Note:
In case consumption does not exceed that of first category, then the bill will be based on 18halalhkwh only.
Following is an example that explains how to calculate the cost of electricity consumption for a person who consumed 7000 kwh in 27 days.
\table[[category,Consumption (kwh),(Halalah / kwh),Total amount],[1,5400,18,972],[2,1600,30,480]]
Total SAR 1452 withot added value and montly meter service
 Question 1(45 points) Write a program that computes a customer's monthly

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