I compiled the code you had and it returned true. Here is my code that I have so far:
#include <iostream>
using namespace std;
int main()
{
double income, assets, lia;
bool creditOK;
cout << "\nEnter your income: $";
cin >> income;
cout << "\nEnter your assets: $";
cin >> assets;
cout << "\nEnter liabilities: $";
cin >> lia;
creditOK = (((income >= 25000) || (assets >= 100000) && (lia < 50000)));
cout << "Credit = "<< creditOK << endl;
return 0;
}
Everytime I run it, it displays Credit = 1 or Credit = 0 instead of true or false and I do not why. Thanks for the help.




Reply With Quote