+ 1

Please tell me why it is not giving decimal values of even after float value . For example for 4 . Thank for help 🙂

https://code.sololearn.com/cn5LN63UOFW1/?ref=app

5th Mar 2022, 6:47 PM
Abhay mishra
Abhay mishra - avatar
2 Respuestas
+ 3
sum and n are both integers. In C dividing an integer by an integer returns an integer. Assigning the result to a float variable doesn't change that.
5th Mar 2022, 7:07 PM
Simon Sauter
Simon Sauter - avatar
0
Thank you very much ☺️
5th Mar 2022, 7:09 PM
Abhay mishra
Abhay mishra - avatar