I'm trying to multiply a decimal number with an integer.

C++ keeps rounding up my decimal before multiplying, therefore resulting in an integer answer when i want a decimal answer.

Please help!

Thanks

C++ keeps rounding up my decimal before multiplying, therefore resulting in an integer answer when i want a decimal answer.

Please help!

Thanks

closed account (*zb0S216C*)

ajung90 wrote: |
---|

"C++ keeps rounding up my decimal before multiplying" |

A computer does not round: it truncates.

Post the expression that's giving the unexpected result; it saves the guess-work.

Topic archived. No new replies allowed.