0
What is wrong with the code?
Was solving the "Easy" problem "Halloween Candy". The code passes only through the first two cases. But the rest of the cases are hidden. So I'm unable to know what is wrong with the code. #include <stdio.h> int main() { int houses; scanf("%d", &houses); //your code goes here if (houses < 3) { return 1; } float answer = (2.00/houses)*100.00; answer = round(answer); printf("%d", (int)(answer)); return 0; }
1 Resposta
+ 2
#include <math.h>
...
answer = ceil(answer)
https://www.sololearn.com/Discuss/2718934/?ref=app