+ 1
ou are making a program for a bus service. A bus can transport 50 passengers at once. Given the number of passengers waiting
ou are making a program for a bus service. A bus can transport 50 passengers at once. Given the number of passengers waiting in the bus station as input, you need to calculate and output how many empty seats the last bus will have. Sample Input: 126 Sample Output: 24
2 Answers
+ 1
Please show us your attempt. Thanks.
Here are some hints:
- To find the number of passengers in the last bus, you can use modulo operator (%)
- To find the free seats (expected output), subtract the capacity by the number of passengers in the last bus.
- 1
Thanks for hint
But show me please coding of this question