63 155
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #4187 in C++ for kuldeep

Question #4187
An electricity board charges according to following rates:
For the first 100 units-40paise per unit
For the next 200 units-50 paise per unit
Beyond 300 units-60 paise per unit.
All users are charged meter charge also which is Rs 50.
Write a program to read the name of users and number of units consumed, and print out the charges with names.
Expert's answer
#include <iostream.h>
#include <conio.h>
void
main()
{
clrscr();
char name[25];
float
units,tc;
cout<<"Electricity Board Charges\n";
cout<<"\nPlease
enter user name : ";
cin>>name;
cout<<"\n\nPlease enter number
of units consumed:-";
cin>>units;


if(units<=100)

tc=units*0.40;
elseif(units<=300)
tc=units*0.50;
else

tc=units*0.60;

float total_cost = tc + 50;

cout<<"\nYour
bill amount:& "<<total_cost;

getch();
}

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

Assignment Expert
17.08.12, 15:52

You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!

shafer khan
17.08.12, 15:48

thankzz bro

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions