Zebra0.com

cpp arithmeticHow many busses?

How many busses?

An organization wants to take a trip. We need enough busses to fit everyone. (We can't tell a few people that they can't go.)

Notice that the ceil function will give us the correct number of busses. However, if we divide 30/25 we will get just one. To find the number of busses we multiply either the numerator or denominator by 1.0 to force the value to double.
busses