Ask coding questions

← Back to all posts
Abs2606 (0)

Hi, im doing a simple project on c. and when i try to divide 120/100 or divide anything by 100, I dont get an accurate answer. It basically rounds itself to an integer despite the fact I defined the variable as a float. Would someone be able to explain why? Thank you

here is my replt link.

InvisibleOne (3211)

Try initiating pay as a double.