Dice roll expectation

the answer i got is 14.7 so rounding off would be 15 but it is showing wrong ans .

@saiKDr when computers round off, they always round off to the lower value so even 14.9999 gets rounded off to 14, not 15. If you want the value to be rounded up, you can use the ceil() function.

@Ishitagambhir but its written in the question the round it off to next value

@Ishitagambhir In a game of fair dice(6 sides) throw, what is the expected number of throws to make sure that all 6 outcomes appear atleast once? Round off the ans to next integer.
this is the que

@saiKDr yes so you can use the ceil function for your purposes. The compiler doesn’t know what is being asked in the question, it will round off to the lower value only.