+ 1

Can anyone explain about the project (Halloween candy).I can't understand the logic in it.

What we need to do in it.

9th Dec 2020, 7:36 AM
RAVIKIRAN.D
RAVIKIRAN.D - avatar
5 odpowiedzi
+ 1
You just have to determine the percentage of probability of you getting a dollar bill
9th Dec 2020, 7:40 AM
noteve
noteve - avatar
0
《 Nicko12 》 But in converting it to percentage I'm strucking in converting it to nearest whole number
9th Dec 2020, 7:42 AM
RAVIKIRAN.D
RAVIKIRAN.D - avatar
0
Can anybody tell wether the probability is 2/x.where x is the input.
9th Dec 2020, 8:04 AM
RAVIKIRAN.D
RAVIKIRAN.D - avatar
0
RAVIKIRAN.D yes 2/x is the probability, but you have to convert that into percentage To round the number to the nearest whole number https://www.geeksforgeeks.org/round-in-cpp/
9th Dec 2020, 8:28 AM
XXX
XXX - avatar
0
XXX yeah that's 200/x.
9th Dec 2020, 8:29 AM
RAVIKIRAN.D
RAVIKIRAN.D - avatar