0
Why the output is always 0?
2 Respuestas
+ 5
Everytime the division is happening between Integers(on line 14,15,19,20 and 23) as both the operands are integers so answer is also casted to integer
means 10/100 will be 0 and not 0.1
Simple fix is to convert either numerator or denominator to float so that system implicitly casts the result to float
Here is the fix👇
https://code.sololearn.com/cRL9323n8USQ/?ref=app
+ 1
Thank you 🙏🙏 very much Arsenic