How can i make a chequebook balancing program of an user’s account?
It will use getline() to read a line, which will contain either the word “withdrawl” or “deposit”.
The next line will contain the amount of the withdrawl or deposit. After reading each pair of lines, the program should compute and print the new balance.
You can declare the variable to hold the running balance to be datatype float, and you can use the function atof() to convert an amount string read by getline() into a floating-point number.
When the program reaches end-of-file, it should exit.
hsoni007
0
Newbie Poster
Recommended Answers
Jump to Post> Give me a chequebook balancing program.
How presumptuous of you that you think you can just roll in here and demand that we do your homework.True or false - this applies to you as well as all the other noobs?
Announcement: We only give homework help …
Jump to PostThere you go, a program to print a balanced checkbook
Well I learnt something from this thread
printf( "CHECKBOOK\n" "=========\n" " ^\n" );
Had no idea you could do that in C.
All 8 Replies
Salem
5,138
Posting Sage
Aia
commented:
Boolean arithmetic is an advanced topic. You might had set expections too high.
+13
hsoni007
0
Newbie Poster
Aia
1,977
Nearly a Posting Maven
Salem
5,138
Posting Sage
hsoni007
0
Newbie Poster
Salem
5,138
Posting Sage
Salem
5,138
Posting Sage
mvmalderen
commented:
Loved the sarcasm ;-)
+13
riahc3
50
Â
Team Colleague
Salem
commented:
:) at least someone got something out of it
+32
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.