Transportation Code Challenge | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

Transportation Code Challenge

What are some other ways people have completed the Transportation Code Challenge after the first C++ module? This is what I created:

3rd Nov 2022, 9:32 PM
Coel Leonard
2 Answers
+ 2
Mine is similar, plus a final adjustment so it outputs the correct number 0 when the last bus has all 50 seats filled. (They wouldn't send an empty bus with 50 available seats).
4th Nov 2022, 12:31 AM
Brian - avatar
I never thought of using the modulus again at the end!
4th Nov 2022, 9:42 AM
Coel Leonard