- 2
Hey! Can anyone tell me the solution of transportation in c++
Please tell me
3 odpowiedzi
+ 1
In that code project you just need to use modulo operator to calculate the number of free seats.
Modulo operator (%) returns the remainder after division. So to get the number of seats on the last bus you need to numberOfPeople%50
But as you need to get number of free seats, you should print 50-(numberOfPeople%50)
But we are not going to give you solution unless you do at least something. Otherwise there is no point, as if we give you solution, you are not going to learn anything anyways.
+ 1
Martin Taylor , oh yeah true...