+ 1

Result always 0 when converting percent to decimal

I'm trying to make a discount program but when I convert percent to decimal it always results in 0. I divide the percent by 100 to convert it to decimal. https://code.sololearn.com/c3f5A58SvDuq/?ref=app

9th Dec 2022, 8:18 PM
Elliot King
1 Antwort
+ 3
divide two integers you get integer, divide integer and float you get float
9th Dec 2022, 10:20 PM
Danila Khaminets
Danila Khaminets - avatar