- 1

Halloween Candy Prop

I have solved this problem outside && it worked but sololearn testers aren't passing me plz help in any language u know edit: sorry guys here's the code double percentage = (2 / houses) * 100; Console.WriteLine(Math.Ceiling(percentage)); edit2: solved with `(2/ (double) houses)` but why must i convert it from int to double first?

17th Sep 2021, 7:06 PM
Aybak3k
Aybak3k - avatar
2 Answers
+ 5
Aybak3kj post your full code.. What is "houses" type there...? edit: Aybak3k int/int results into int type only.. so ex: 2/5 = 0 but 2/5.0 = 0.4 2.0/5= 0.4 so you must convert.
17th Sep 2021, 7:15 PM
Jayakrishna 🇼🇳
+ 3
Aybak3k Where is your code?
17th Sep 2021, 7:10 PM
AÍąJ
AÍąJ - avatar