Hey! Can anyone tell me the solution of transportation in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Hey! Can anyone tell me the solution of transportation in c++

Please tell me

30th Sep 2021, 6:39 AM
Harjot
2 Answers
+ 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.
30th Sep 2021, 7:50 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Martin Taylor , oh yeah true...
30th Sep 2021, 3:03 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar