Computers & Internet Logo

Related Topics:

Posted on Jan 12, 2011
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

How to write an electricity bill in c program(9'th class)

1 Answer

Anonymous

Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

  • Expert 502 Answers
  • Posted on Jan 12, 2011
Anonymous
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

Joined: Jul 02, 2010
Answers
502
Questions
0
Helped
424587
Points
952

#include <iostream.h>
#include <conio.h>
int main()
{
clrscr();
long int units,charge=0;
float total;
const int rent=25;
cout << "Enter the number of units used : ";
cin>>units;
if(units>200)
charge=(units-200)*20+150*40+50*60;
else if(units>50)
charge=(units-50)*40+50*60;
else
charge=units*60;
total=0.01*charge+rent;
cout << "You have used " << units << " units." << endl;
cout << "Your total telephone bill is $" << total;
getch();
return 0;


Please accept the solution. Thanks, Lucy
}
This program takes in the number of units used ('units') as a screen input from the user.
It then calculates the total telephone bill for the customer on the following basis :
A compulsory fee of $25, plus
60 cents per unit for the first 50 units,
40 cents per unit for the next 150 units,
20 cents per unit for anything above 200 units.
It then outputs the bill using the 'cout' command.

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

How to reset tv

hi Tracie,
is the set making a clicking noise?
is the power light flashing on the front?
or no power light at all just dead?
if the set is just dead, just put your ear to the back vents can you hear like a very faint screaming noise and can you smell and burning in the vent?
if so it just could be capacitors on the power board.
if its clicking the that will need a service kit on the power supply board.
if the power led is flashing then you will need to count how many flashers from start to finish when you first turn set on.
hope this helps.
Panasonic TH 42PX75 80 TH C42hD18 Dead TV Repair Fix TXN P1XGTUS HNTUS... Panasonic TV Won Turn On Learn How to Replace Your Power Supply FIX Panasonic Viera 42 inch Plasma SU BOARD TH 42PX75U Diagnosis Repair...


0helpful
1answer

Gas and electric bills

3 to 4 loads of laundry seems like an awful lot for an elderly couple but if you call your local churches and even your electric company they usually have or know of programs to help the elderly. They may even know of government assistance programs that they may be eligible for.
0helpful
1answer

How can i program the counter to count bills totaling one hundred...for example one hundred ones and restarts

The Batch button allows you to count bills in batches from 1 - 999. For example, if you want to sort into piles of 100 bills, the machine will count 100 bills, then stops. Once you remove those 100 bills, it will continue to count the next batch of 100 bills, then stops again. The machine is preset to common counting mode, To count bills in batches, press BATCH. Batching is preset to 100 bills. To change batch amount, press C to clear, and use the keypad to enter a batch number between 1 and 999. Press SET to save the setting.

6helpful
1answer

Can you reprogram another key fob for mercedes e class. if so how .many thanks.

yes. you can program any number. put the key in the ignition push the lock button on your keyfob, pull th key out while holding down the lock button and press the unlock button 5 times. Your key is now reset and ready for use
0helpful
1answer

I want to know the code of electrical billing system using class structure

Hi,


Check the below mentioned link :-


http://www.sourcecodester.com/cc/electricity-billing-system-version-10.html

copy and paste it in the browser and press enter.

Thanks for using "Fixya".
1helpful
1answer

Write a c program ''to maintain electricity bill''

It sounds like a homework assignment that you are supposed to write. Get a copy of your electric bill and look at all the various charges, fees, taxes, etc. Then write the program.
0helpful
1answer

R340 won't print Clarisworks 5.0 classic on my G5 Power MAC

Try to use another program, and if it works, you need to uninstall and reinstall th Clarisworks 5.0
Not finding what you are looking for?

274 views

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

k24674

Level 3 Expert

8093 Answers

Brad Brown

Level 3 Expert

19187 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...