Question: using matlab write a code : You are working as a site engineer in NEPCO. Your colleague asked you to prepare a report related to

using matlab write a code : You are working as a site engineer in NEPCO. Your colleague asked you to prepare a report related to the electricity bills in a small neighbourhood in Amman. The electricity bills of residents are calculated as follows:using matlab write a code : You are working as a site

Taski You are working as a site engineer in NEPCO. Your colleague asked you to prepare a report related to the electricity bills in a small neighbourhood in Amman. The electricity bills of residents are calculated as follows: If 500 units or fewer are used the cost is 0.02 JOD per unit. If more than 500 but not more than 1000 units are used, the cost is 0.02 JOD per unit for the first 500 units and 0.05 JOD for every unit in excess of 500. If more than 1000 units are used the cost is 0.035 JOD per unit for the first 1000 units and 0.07 JOD for every unit in excess of 1000. A basic service fee of 5 JOD is charged, no matter how much electricity is used. A. Draw the flow chart for a system that calculates and displays the cost for electric bill of a resident with known consumption units. B. Following are the consumptions (units) for a number of residents: 200, 450, 501, 1010, 85, 700. Write a program that enters the previous consumptions into a vector then: I. Use a "for" loop to calculate and display the total cost for each resident II. Use a "while" loop to calculate and display the total cost for each resident

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!