Write a C++ program that reads and processes a loan-applicationfile myfile.dat .
ID: 3617153 • Letter: W
Question
Write a C++ program that reads and processes a loan-applicationfile myfile.dat. Each record (line) ofthe file contains an application number (nine digits) and a desiredloan amount (dollars and cents). One record exists for eachapplication.
Your program is to read the input file and produce aloan-deposit report written to an output file (you choose itslocation and name). The report shall display a line for eachapplication, each line containing the application number, thedesired loan amount, and the required deposit. Display at thebottom of the report the average deposit required. The amount ofthe deposit shall be calculated according to the followingtable.
LoanRequest Required Deposit
Less than $25,000.00 5% of loan request
$25,000.00 - $49,999.99 $1,250.00 + 10%of loan request over $25,000.00
$50,000.00 -$99,999.99 $5,000.00 + 25% of loan request over $50,000.00
$100,000 ormore The loan cannot be approved
Use a separate function to compute the required deposit.
Explanation / Answer
please rate - thanks sorry it's late-I've been busy and it got lost in my bookmarks #include #include using namespace std; double loan(double); int main() {int num; double amt,dep; ifstream in; ofstream out; in.open("myfile.dat"); if(in.fail()) { coutamt; dep=loan(amt); if(depRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.