English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Here is the problem:
A credit Card company will only approve a loan if the applicants income is >= $25,000, thier assets are >= $100,000, and thier liabilities are <$50,000. Write a program that accepts three numbers representing the above catagories : then assign the value true or false to the boolean variable creditOK according toe these criteria and display this value.

Its a standard Boolean type of program with having 3 numbers and out of the three determine if the output will be true(loan being approved) or False(loan not approved). If at all possible I would like to get any feeback on this matter, and maybe the source code as well. Thank you.

2007-02-02 01:09:27 · 5 answers · asked by gatz1000 4 in Computers & Internet Programming & Design

5 answers

#include

int main()
{

double income, assets, liabilities;
bool creditOK;

cout << "Enter applicant's income: ";
cin >> income;
cout << "Enter applicant's assets: ";
cin >> assets;
cout << "Enter applicant's liabilities: ";
cin >> liabilities;

if(income >= 25000 && assets >= 100000 && liabilities > 50000)
creditOK = true;
else
creditOK = false;

cout >> creditOK;

return(0);
}

2007-02-02 01:25:13 · answer #1 · answered by AlexM138 3 · 0 0

XNA isn't a application, greater like a library... yet i'm getting too far forward. C# is between the greater convenient programming languages to verify. yet that doesn't propose, that that is going to be particularly undemanding. in case you haven't any longer any adventure with programming, you will might desire to verify lots, until you may now write even an undemanding sport. All that suggested - programming isn't sport layout. sport layout - the flexibility of designing the content fabric and regulations of a sport. So, what do you particularly need? Programming or sport layout? Or the full equipment? once you're particularly involved in XNA, i might propose beginning via googling "C# educational". there is assorted large C# tutorials obtainable.

2016-11-02 03:10:04 · answer #2 · answered by ? 4 · 0 0

It's pretty simple, first your program needs to collect the applicant's income, assets and liabilities. You should set creditOK to false initially and then test that income >= $25,000, assets >= $100,000 and liabilities < $50,000. If those conditions are true, then creditOK is true.

2007-02-02 01:12:45 · answer #3 · answered by Pfo 7 · 0 0

#include
typedef Boolean { FALSE, TRUE }

void main()
{

float applicants_income, assets, liabilities;
Boolean creditOK = FALSE;
cout << "enter the applicant's income please : ";
cin >> applicants_income;

cout << "\nenter the applicant's assets : ";
cin >> assets;

cout << "\nenter the applicant's liabilities : ";
cin >> liabilities;

if(applicants_income >= 25000 && assets >= 100000 && liabilities < 50000) creditOK = TRUE;

cout << creditOK;
}


//as you can see, there's no error checking in this program but its a pretty simple assignment...

2007-02-02 01:20:06 · answer #4 · answered by Moyo 2 · 0 0

Are you trying to cheat on your computer programming 101 course by any chance?

2007-02-02 01:12:04 · answer #5 · answered by Anonymous · 1 0

fedest.com, questions and answers