Stuck | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Stuck

Explanation: 20% of 50 is 10. To calculate 20% of a given amount, you can multiply the number by 20 and divide it by 100: 50*20/100 = 10.0

1st Apr 2021, 6:48 AM
Muhammad Sandi Tias
Muhammad Sandi Tias - avatar
1 Answer
0
In programming (%) (modulus) doesn't calculate percantage of a given value. It rather returns remainder . 50%20 == 20 * 20 + 10 Here remainder is 10 . so 50%20 == 10. In math 50%20 == 50*20/100
1st Apr 2021, 7:12 AM
TOLUENE
TOLUENE - avatar