0
can help me in this easy proplem
hello every one I well start to make solutions for this proplem and because I dont have the pro app I can't see that all solution l will this code and I know some thing is wrong that I know get solution is wrong but I work for 2 hour and this my result the problem name in solo learn is Halloween Candy https://code.sololearn.com/cTH3eKa7JNN9/?ref=app
23 odpowiedzi
+ 3
Even Pro status does not get you answers to the hidden Code Coach answers. They are locked for everyone.
To round up as required, use the ceil() rounding function. Your code already imports the cmath library where it is found. So just cout << ceil(x);
+ 2
@Brian ok thanks but doesn't work
+ 2
that's not important now ,why the ceil dosent work
+ 2
Ayham Ibrahim, okay I will take back my words. The input loop is fine to leave in place, and even useful when interacting with a live person. I just think with Code Coach it is different, since the description promises to give values >=3 and it won't retry, so there is not much need to test for input range and retry.
Back to the code.... the ceil function is getting called, but the return value is not saved. Try x = ceil(x).
+ 2
Brian thanks man every things now is work and logic
thanks 🖤🔥
+ 2
Ayham Ibrahim Congratulations! I wish you well on your training.
+ 2
Ayham Ibrahim did you complete it
+ 2
Ayham Ibrahim Read question properly. Here i made some changes with comment. You should see the code once
https://code.sololearn.com/cj2WIG6yDOai/?ref=app
+ 2
see how i solved here
https://code.sololearn.com/c1XXFH8Z9474/?ref=app
+ 1
Ayham Ibrahim was there a purpose in using a while loop when taking input?
+ 1
yes
to make input more or equal three Brian
+ 1
Ayham Ibrahim okay, it is doing that, but I don't understand why. The program might be more successsful if you accept any input given by Code Coach. Just get input once and use whatever value it supplies.
+ 1
ok,what you do when user input is two or one or any number less than three ?? you should ask him more and more to but number more or equal than three.Brian
+ 1
Hi
+ 1
Hey
+ 1
Biswajit Jena on what
+ 1
how can i help
+ 1
hy
0
Sir please help me