I've tried everything possible and the final answer won't round up. This is what I have so far and this is what it is telling me to do.
"Enter pounds: 7
Enter shillings: 17
Enter pence: 9
Result in Decimal pounds = £7.89
In ASCII the '\x9c' represents the pound sign. Also, display the result with two decimal places (display £7.89, not £7.88xxxx) by using the fixed, showpoint and setprecision() manipulators"
I got the code working perfectly, the one issue I am having is that I keep getting £7.88 not £7.89
I got it rounded to 2 decimal places at least. If anyone can help that would be highly appericated. Thank You
Well part of your issue is that integers are always rounded down by default.
Another issue is even if integers were rounded up, Pence is an integer in itself, so you will not be able to perform proper rounding on it.
Solution: Change pence to a float.
Add 0.5 to your pence calculation to make it round correctly.
When calculating shilling, recast your Pence as an integer so you can use mod (%).