+ 2
Can someone explain me this bug?
I was trying to solve "Halloween Candy" but after the second case it seems like there is no input https://code.sololearn.com/cM9QvA6VN4Wz/?ref=app You can copy and paste the code in code coach to see what happens
4 Respuestas
+ 5
Get the result of 2/houses * 100 as a float value then round up (Ceiling()) and output that value as an integer.
+ 3
You only need 2 lines of code in your Main() method.
float houses = Convert.ToSingle(Console.ReadLine());
Console.WriteLine(Math.Ceiling((2/houses)*100))
+ 1
Now is when I realize that I didn't understand the description of the challenge and I thought it was much more complex than it actually was. Thank you dude
0
ChaoticDawg I modified the code but althought I declare float variables the code takes that result as a double