I am working on an assignment and I need to make different if/else statements to calculate penalties on a bill. Anyway, if the person pays between 20%-50% of their billing amount, then they receive a 10% penalty on their remaining balance. I am having trouble figuring out how to set up this statement.
1 2
elseif(desiredPay >= billingAmount * .20 || desiredPay <= billingAmount * .50)
cout << "Your remaining balance is $" << remainingBalance << " with a penalty of $" << remainingBalance * ATLEAST_20 << "." << endl;
The ATLEAST_20 is a constant that applies a 10% penalty on the remaining balance.
I am not sure how to set up an inequality such as 20% <= x <= 50%