Infolinks - Earn Easy Money

Friday, April 3, 2015

C++ program to calculate electric bill

#include <iostream>
using namespace std;
int main ()
{
int a,b;
cout<<" DESIGNED BY : MUHAMMAD REHAN ASGHAR" <<endl;
cout<<" ELECTRICITY BILL CALCULATOR" <<endl;

cout<<" ENTER YOUR UNITS \n";
cin>> a;

if (a<=100)

{
b=a*3;
cout<<"  YOUR BILL IS \n";
cout<< b;
}

else if (a<=300)

{
b=(100*3)+(a-100)*7;
cout<<"  YOUR BILL IS \n";
cout<< b;
}

else if (a>300)

{
b=(100*3)+(200*7)+(a-300)*11;
cout<<"  YOUR BILL WILL BE\n";
cout<< b;
}
return 0;
}

10 comments:

  1. sir if we add commercial type mean personal and commercial type ..then i wanna add tax 3%in commercial type..how will it posiblle????

    ReplyDelete
  2. can u help me with this
    selection and loop
    structure in C++ programming.
    For this assignment you are required to create a program for Save Energy Electricity & Co to
    assist them in automating the billing process for all its customers. A customer is billed at
    33.10 cents per unit. However, all households with a combine annual income below $30,000,
    will be eligible for government subsidy for the first 100 units of electricity usage per month
    at a rate of 0.1590 cents per unit. All units above 100 will be charged the full tariff.

    out put should look like this
    Enter Customer Name: Arnold Walker
    Enter Previous Meter Reading: 785630
    Enter Current Meter Reading: 785810
    Is the Customers Household income below $30,000? Y
    ***********************************************************
    Save Energy Electricity & Co
    ***********************************************************
    Customer Name: Arnold Walker
    Units Used: 180
    Summary:
    --------
    Charges (VEP) - 180 unit’s x 33.10 cents: $59.58
    Government Subsidy is 100 units @ 0.1590: $15.90
    VAT: $ 5.36
    Total Bill (VIP): $49.04
    ***********************************************************

    ReplyDelete
  3. can u help me with this
    selection and loop
    structure in C++ programming.
    For this assignment you are required to create a program for Save Energy Electricity & Co to
    assist them in automating the billing process for all its customers. A customer is billed at
    33.10 cents per unit. However, all households with a combine annual income below $30,000,
    will be eligible for government subsidy for the first 100 units of electricity usage per month
    at a rate of 0.1590 cents per unit. All units above 100 will be charged the full tariff.

    out put should look like this
    Enter Customer Name: Arnold Walker
    Enter Previous Meter Reading: 785630
    Enter Current Meter Reading: 785810
    Is the Customers Household income below $30,000? Y
    ***********************************************************
    Save Energy Electricity & Co
    ***********************************************************
    Customer Name: Arnold Walker
    Units Used: 180
    Summary:
    --------
    Charges (VEP) - 180 unit’s x 33.10 cents: $59.58
    Government Subsidy is 100 units @ 0.1590: $15.90
    VAT: $ 5.36
    Total Bill (VIP): $49.04
    ***********************************************************

    ReplyDelete
  4. can u help me with this
    selection and loop
    structure in C++ programming.
    For this assignment you are required to create a program for Save Energy Electricity & Co to
    assist them in automating the billing process for all its customers. A customer is billed at
    33.10 cents per unit. However, all households with a combine annual income below $30,000,
    will be eligible for government subsidy for the first 100 units of electricity usage per month
    at a rate of 0.1590 cents per unit. All units above 100 will be charged the full tariff.

    out put should look like this
    Enter Customer Name: Arnold Walker
    Enter Previous Meter Reading: 785630
    Enter Current Meter Reading: 785810
    Is the Customers Household income below $30,000? Y
    ***********************************************************
    Save Energy Electricity & Co
    ***********************************************************
    Customer Name: Arnold Walker
    Units Used: 180
    Summary:
    --------
    Charges (VEP) - 180 unit’s x 33.10 cents: $59.58
    Government Subsidy is 100 units @ 0.1590: $15.90
    VAT: $ 5.36
    Total Bill (VIP): $49.04
    ***********************************************************

    ReplyDelete
  5. I HAVE A SIMILAR QUESTION BUT NEED HELP WITH THE SOURCE CODE THAT PRINTS THE OUTPUT WITH COST UNITS, FIXED CHARGE, EXERCISE DUTY, VAT, AND TOTAL BILL

    ReplyDelete
  6. requests for the units consumed in kWh. The program should then
    calculate and display the cost of the units, fixed charge, exercise duty, VAT and the Total Bill.

    ReplyDelete
  7. sir can u help me to make this program by using functions and pass by reference.

    ReplyDelete

Must drop your comments about post.