jeudi 21 février 2019

Is it possible to combine a second if statement with the first one in C++?

I'm a beginner in C++ and currently taking it in school and just have a quick question.

Attached is the picture of the code I have currently. 1

I want to take the result from the first IF statement and add it onto the results of the second IF statement.

For example, if I were to enter the balance as 100, the fee would be $45 plus the fees dependent on the second if-statement.

For example, if the user had $100 as their starting balance and has written 40 checks that month, the total fees will be the $20/month, $25 (because it's less than $500 balance) & an additional $2.40 based off the checks he has written. How do I add the $2.40 onto the first if statement as there's no variable?

Thanks!!

Aucun commentaire:

Enregistrer un commentaire