Question #37520

. An electricity board charges the following rates for the use of electricity:
a. For the first 200 units: TK 1.9 per unit
b. For the next 100 units: TK 3.0 per unit
c. Beyond 300 units: TK 5.00 per unit
All users are charged a minimum of TK 200 as a meter charge. If the total amount is more than TK 500,
then an additional surcharge of 15% of total amount is charged. Draw a flowchart to take input as
number of units consumed by a customer and output the charges.
1

Expert's answer

2015-05-29T05:21:17-0400

// "Answer on Question #37520, Programming, C++


#include<string.h>
#include<iostream>
using namespace std;
int main() {
    int a, s, d, z;
    cout << "Enter the number of units consumed by a customer: ";
    cin >> a;
    if (a < 200)
        z = 1.9 * 200;
    if (a > 200 && a < 300)
        z = 1.9 * 200 + (a - 200) * 3;
    if (a > 300 && a < 500)
        z = 1.9 * 200 + 100 * 3 + (a - 300) * 5;
    if (a > 500)
        z = (1.9 * 200 + 100 * 3 + (a - 300) * 5) * 1.15;
    cout << "Charges " << z << endl;
    system("Pause");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS