Develop an application that will determine if a bank customer has exceeded his c
ID: 3539116 • Letter: D
Question
Develop an application that will determine if a bank customer has exceeded his checking account. The following facts are available and input into the program: a. Account number (Five digits only) b. Balance at the beginning of the month c. Total of all checks written by this customer this month d. Total of all deposits credited to this customer's account this month. The program should input each of these facts as unsigned shorts, calculate the new balance, display the new balance and debit the account $17.50 if overdrawn. Also, if overdrawn, tell the customer an additional $17.50 fee has been accessed and what the balance whould be with this fee included
Explanation / Answer
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
short ab,bal,ch,dep;
cout<<"enter account number";cin>>ab;
cout<<endl<<"enter balance";cin>>bal;
cout<<endl<<"total of all checks";cin>>ch;
cout<<endl<<"total deposits";cin>>dep;
bal=bal-ch+dep;
if(bal<0)
{cout<<endl<<"you are debited with $17.50";
bal=bal=17.5;
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.