Hey there

I have this C++ program to do where I have to output principal, interest and debt and those type of things, all in a table.

My program works well, except fot the fact that the cents are not correctly outputted. Like, instead of getting a value like 46999.88, im getting 46999.17 :eek:

Can anyone please help me?


Greetings Nabs,

The floating-point type variables can be tricky to handle, as their values are complex and padded. Though, it could be a simple mathematical mistake, or the compiler is not processing something.

It could be anything, though it may help discover the real issue if you posted some type of code to see where and how your code is producing the incorrect values.

- Stack Overflow