+ 1

Help, me in solving this code!!!

Can anyone tell me how to solve the "Halloween Candy" code. Present in Community, code coach section. I known it's not difficult but my code is just not giving a desirable output. HERE is my code link... https://code.sololearn.com/cJAvOTbVN6Ez

5th Nov 2020, 6:02 AM
Krish
Krish - avatar
3 Réponses
+ 2
The question says to round UP, so i suggest using ceil
5th Nov 2020, 8:26 AM
Benjamin Jürgens
Benjamin Jürgens - avatar
+ 1
But the Question says that we have to round off the percentage to nearest whole number so what's wrong with Math.round() function...
5th Nov 2020, 6:59 AM
Krish
Krish - avatar
+ 1
Thanks Benjamin for your help...
5th Nov 2020, 9:19 AM
Krish
Krish - avatar