I've made a program of basic bank transaction. I'm having a hard time figuring out how will that cin >> newb; and cin >> currentb; work out...the program works if you remove the formulas..also i'd like to add if (withdraw <=10000) the program will stop the user from withdrawing but i don't know how will i insert it in there since i've been receiving too much errors if i do so...
and, if you don't mind, how will i post my code so you guys can check my crap program..lol~..
thanks~ :?:
r.cromwell
0
Newbie Poster
Recommended Answers
Jump to PostPost your code between the code tags [_CODE_] [_/_CODE_] (with no underscores).
Jump to Post1) Everywhere you use cin, you are SETTING the value instead of displaying it.
2) Missing semi-colon on lines 25 and 34
Jump to PostFor starters, when dealing with money, a transaction is almost never an even-dollar amount (or whatever unit of currency you use). You should deal exclusively in floating-point data types (i.e. "float" or "double") and avoid integer data types.
Second, your equation for calculating a withdrawal (Line 25) actually gives …
All 10 Replies
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
r.cromwell
0
Newbie Poster
r.cromwell
0
Newbie Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
Fbody
682
Posting Maven
Featured Poster
r.cromwell
0
Newbie Poster
r.cromwell
0
Newbie Poster
r.cromwell
0
Newbie Poster
Ketsuekiame
860
Master Poster
Featured Poster
r.cromwell
0
Newbie Poster
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.