new task befor 27th of june

Assignment

Problem Statement:
Printing Electricity Bill
Detailed Description:
Write a C++ program in which you have to:
1. Create a text file “Electricity_Bill”.

2. Write following data in it:










Electricity Consumer Bill
---------------------------------------------------------------------------
Reference No Tariff Load Old A/C No
123456789123456 2 1 123456789123456

---------------------------------------------------------------------------
Name and Address
XYZ

---------------------------------------------------------------------------
Reading MF Total Unit Consumed Total Cost of electricity
55671 1 328 9999

---------------------------------------------------------------------------
Month Units Bill Current Bill 10732
Jan-11 312 5000 Arrears 0
Feb-11 312 5000 Tariff Subsidy NA
Mar-11 312 5000 Payable within Duedate 10732

---------------------------------------------------------------------------

3. Open file and read data from it and display it on the screen.

Sample Output



Good luck. Let us know how it goes.
closed account (D80DSL3A)
If I do the assignments for you can I get the college credit for the class?
plz help me
Nice comback haseebsarwar42.

"plz help me"... so epic.

and before you think of another clever thing to say read this: http://cplusplus.com/forum/articles/1295/

thank you very much all of you .
now can you help me how to unsub from this forum.
plz plz plz help .i thing it is legal becouse this ih not in this link http://cplusplus.com/forum/articles/1295/ .read this
now can you help me how to unsub from this forum

At the bottom where it says "Tracking options for this topic: "
Click the dropdown, then choose Unsubscribe

Also, if you had read that article, you'd have noticed this:
Don't post homework questions
Programmers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions.
Last edited on
you have not read me reply i am asking for to complete unsub from this site mean to not use my name as forum member any more
thanks and yes
plz help me
You can't. Good luck!
i have made it yesterday but that was two files i was just want a littel help and all of you becomes
------ .
this is my code
#include<iostream.h>
#include<fstream.h>
main()
{
ifstream infile; //Handle for input file//
char inputfilename[]="Electricity_Bill.txt";//file name,this file will be in the current directory//
const int MAX_CHAR_TO_READ=200; //maximum character to read in one line//
char completelinetext[MAX_CHAR_TO_READ];//use of getline function//

infile.open(inputfilename); //Opening the file//
//checking that file is successfuly opened or not//
if(!infile)
{
cout<<"Can't open input file namced"<<inputfilename<<endl;
exit(1);
}
//Rading the complete file lie by line and printing on screan
while(!infile.eof())
{
infile.getline(completelinetext,MAX_CHAR_TO_READ);
cout<<completelinetext<<endl;
}
infile.close();
}
Topic archived. No new replies allowed.