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
Salem 5,199 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,199 Posting Sage
hsoni007 0 Newbie Poster
Salem 5,199 Posting Sage
Salem 5,199 Posting Sage
tux4life 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.