An electricity board charges the following rates to domestic users to discourage large consumption of energy:
FOR the first 100 units - 60P per unit
For next 200 units - 80P per unit
Beyond 300 units - 90P per unit
All users are charged a minimum of Rs.50.00. if the total amount is more than Rs.300.00 than an additional surcharge of 15% is added Write a C++ program to read the names of users and number of units consumed and print out the charges with names.


Implementation of above problem in C++ language:
#include<iostream.h>
#include<conio.h>
int main()
{
int no_unit;
float charge,scharge;
char name[20];
cout<<”\n enter name and number of units consumed”;
cin>>name;
cin>>no_unit;
if(no_unit<=100)
charge=(0.60*no_unit);
elseif(no_unit>100&&no_unit<=300)
{
charge=(100*0.60);
charge+=((no_unit-100)*0.80);
}
elseif(no_unit>=300)
{
charge=(100*0.60);
charge+=(200*0.80);
charge+=((no_unit-300)*0.90);
}
if(charge<50)
charge=50;
if(charge>300)
{
scharge=(0.15*charge);
charge+=scharge;
}

cout<<”electricity bill \n”;
cout<<name<<” : : rs”<<charge;
getch();
return(0);
}


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

15 comments:

  1. Kids today have many more electrical toys and gadgets than we did when we were their age. That's why it's critical the whole family be involved in any plan towards reducing electricity bills. this contact form

    ReplyDelete
  2. Fesco Bill Says: Thanks for the great article and amazing information.

    ReplyDelete
  3. Thank you for your blog post. Much thanks again. Really Cool.העברת חשבון חשמל

    ReplyDelete
  4. Nowadays, you’ll play an entertainment that will remind you of Bomberman, and it’ll be without a doubt more fun in case there are two of you playing. Murder your enemies and make, past any question, they can’t hurt you. Put your bombs around the common item and win a couple of compensate things. Make beyond any doubt you missing some time as of late the bomb explodes also use caution of the traps your equal will set.Naz

    ReplyDelete
  5. Incredible!! exceptionally valuable data you shared with us. thank you for sharing.
    thank you nice article

    ReplyDelete
  6. I dont know if someone has already told you this, and even if they have I want to confirm what they probably have said before – you are simply beautiful.

    ReplyDelete
  7. it shows error in 1st line :
    | #include
    | ^~~~~~~~~~~~
    compilation terminated.

    ReplyDelete
  8. For Further information you can
    Click here thanks

    ReplyDelete
  9. I’ve been using Fesco online bill check system for a while now, and I must say, it’s been a game-changer for me. With just a few clicks, I can easily access my bills online. The user-friendly interface and seamless navigation make the whole process a breeze. “fesco bill online

    ReplyDelete
  10. If you’re looking for a hassle-free way to check your sepco bill online, look no further! You can easily access your sepco bill by visiting sepco bill Online Check. With just a few clicks, you can stay up-to-date with your electricity expenses and manage your finances efficiently. Don’t miss out on this fantastic online tool for checking your sepco bill effortlessly!

    ReplyDelete