How would you write the code for this homework on visual des
How would you write the code for this homework on visual design C++ win 32
Credit Assist v1.1 Our bank needs a tool that will help us in determining credit worthiness of loan applicants.
We will enter the following information to Credit Assist program:
- Monthly Income (income) - Total Debt (debt)
- Monthly minimum payments for the debt (minPay)
If total debt is more than 6 months monthly income of the applicant (income*6), we cannot grant any loan. Inform user that no loan can be granted.
Otherwise, you subtract the minimum monthly debt payment from monthly income. We can allow up to 30% of that amount as loan.
credit = (income - minPay) * 0.3 Let user know that the applicant can be approved for upto this (credit) amount.
Hints are
#include
using namespace std;
int main()
{
// this is where your code goes
system(\"PAUSE\");
return 0;
}
double income;
cout << \"What is your income? \";
cin >> income;
if (debt > 6 * income)
{
// cout to user that cannot grant loan
}
else
{
double credit; // declare output variable
credit = (income - minPay) * 0.3;// processing
// cout to user that they are approved for credit amount.
Solution
#include <iostream>
using namespace std;
int main()
{
// this is where your code goes
double income,debt,minPay,credit;
cout << \"What is your income? \";
cin >> income;
cout << \"What is your total debt? \";
cin >> debt;
if (debt > 6 * income)
{
cout<< \"The user is not eligble for loan\";
}
else
{
cout<<\"What is the monthly minimum payments for the debt?\";
cin>>minPay;
credit = (income - minPay) * 0.3;// processing
// cout to user that they are approved for credit amount.
cout<<\"The approved loan amount is \"<<credit;
}
}

