*********************C++ program***********************
( I have tried to write this code in c++ atleast 10 and I cant get the outputs to print correctly)
The purpose of this challenge is to use the IF, IF-ELSE-IF and nested IF statements to control program flow. This simulates the credit underwriting process for a loan.
Requirements
example of outputs
_________________________________________________
-- Thank you for applying for our loan -- What is your credit score? 720 Have you had a bankruptcy? n Your application has been APPROVED! Your rate is 3.5%
________________________________________________________
-- Thank you for applying for our loan -- What is your credit score? 580 Have you had a bankruptcy? n Unfortunately, your application has been denied. You may apply again in 6 months.
___________________________________________________
-- Thank you for applying for our loan -- What is your credit score? 720 Have you had a bankruptcy? y Has your bankruptcy been discharged? y Your application has been APPROVED! Your rate is 6.5%
____________________________________________________________
-- Thank you for applying for our loan -- What is your credit score? 640 Have you had a bankruptcy? y Has your bankruptcy been discharged? n Unfortunately, your application has been denied. You may apply again in 6 months.
In case of any query do comment. Please rate answer as well, Thanks
Code:
#include <iostream>
using namespace std;
int main()
{
int score;
char discharged, bankruptcy;
double rate=0.0;
cout <<
"----------------------------------------------------------------"
<< endl;
cout << "-- Thank you for applying for our loan --" <<
endl;
//user input for score and bankruptcy
cout <<"What is your credit score? ";
cin >>score;
cout << "Have you had a bankruptcy? ";
cin >> bankruptcy;
//if bankruptcy is yes
if(bankruptcy =='y')
{
//then ask for the status
cout << "Has your bankruptcy been discharged? " ;
cin >>discharged;
//if not discharged then application is denied and return
if(discharged == 'n'){
cout <<"Unfortunately, your application has been denied."
<<endl <<"You may apply again in 6 months."
<<endl;
return 0;
}
}
//condition to check however, the user has not had a bankruptcy, or
the user had a bankruptcy and it has been discharged
if((bankruptcy =='n') || (bankruptcy =='y' &&
discharged=='y'))
{
//IF-ELSE-IF to check for rate
if(score < 650)
{
cout <<"Unfortunately, your application has been denied."
<< endl <<"You may apply again in 6 months."
<<endl;
return 0;
}
else if(score <= 720)
rate =3.5;
else if(score <=850)
rate =1.5;
if(discharged == 'y')
rate +=3.0;
}
//If you are here your application is approved. Display the
output
cout << "Your application has been APPROVED! Your rate is "
<< rate << "%" <<endl;
return 0;
}
==============screen shot of the code ========

Output:




*********************C++ program*********************** ( I have tried to write this code in c++ atleast 10 and I...
Trying to write this program using c language using
functions, pointers and loops.
"al 67% 1 1 :14 AM importanu Name your TIies HW2 firstlastname.c Develop a solution to the following problem: A financial institution will only accept loan applications if the following conditions are met: The applicant must own his/her home with no mortgage payment and -The applicant must have a total annual household income of no less than $45000.00. The applicant must have a credit score of no...
Modular program mathlab: Write a program in Matlab that would continuously ask the user for an input between 1 and 6, which would represent the result of rolling a die. The program would then generate a random integer between 1 and 6 and compare its value to the value entered by user. If the user’s die is larger, it should display, “You got it” If the user’s die is smaller, it should display, “Nice try” If the results are the...
Write the pseudocode below as a working Python program. Take a screenshot of your code and output and paste into your answer document. User input of ‘y’ or ‘Y’ should cause the loop to continue. // Constant for the commission rate // Declare as a global variable Constant Real COMMISSION_RATE = 0.10 Module main() // Local variable Declare String keepGoing = "y" // Calculate as many commissions // as needed. While...
Program Requirements · The program prompts the user to enter a loan amount and an interest rate. · The application calculates the interest amount and formats the loan amount, interest rate, and interest amount. Then, it displays the formatted results to the user. · The application prompts the user to continue. · The program stops prompting the user for values after taking 3 loan amounts. · The application calculates and displays the total loan and interest amount and ends the program Example Output Welcome to...
I do not know how to code this. I have tried several
times.
Instructions CountByAnything.java + Modify the CountByFives application so that the user enters the value to count by. Start each new line after 10 values have been displayed. 1 public class CountByAnything 2 { // Modify the code below 4 public static void main(String args[]) { Grading final int START; final int STOP = 500; final int NUMBER_PER_LINE = 10; for(int i = START; i <= STOP; i...
COP 2220 Into programming in C(Answer in C, not C++). The question is: Please write the algorithm for a AppStore programming assignment. The details of the assignment, a sample algorithm, and its outline, are located below. Make the algorithm at least half a page, easy to read, and to understand, how it works. I just want the algorithm, not the programming code, I have that. I only need the ALGORITHM. Thanks for helping me out, I apprieciate it, have a...
I need to see the program in C++: You are to write a payroll application for
a company. You should prompt the user to input two values in the
following order. 1. The number of hours they worked. Our company
only pays employees for full hours of work and do not count partial
hours. Employees are not allowed to round up the time worked. So, 5
would be a valid input, but 5.7 would not be. 2. The hourly rate...
C++ programming please Write a program that will display random numbers in order from low to high. 1. Declare an integer array of size 100. Ask the user how many numbers to work with (n). It can be less than 100. 2. Generate random numbers from 10 to 50. 3. Write the random numbers to an output file named random.dat. Close the file. 4. Open random.dat for input and read the data values into your array. Pass your array to...
This C++ Program should be written in visual studio 2017 You are to write a program that can do two things: it will help users see how long it will take to achieve a certain investment goal given an annual investment amount and an annual rate of return; also, it will help them see how long it will take to pay off a loan given a principal amount, an annual payment amount and an annual interest rate. When the user...
#PLEASE WRITE THE CODE IN JAVA! THANK YOU IN ADVANCE! Write a program that manages a list of up to 10 players and their high scores in the computer's memory. Use two arrays to manage the list. One array should store the players' names, and the other array should store the players' high scores. Use the index of the arrays to correlate the names with the scores. Your program should support the following features: a. Add a new player and...