+ 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

30th Jan 2021, 4:14 AM
Abhishek Mujawadiya
Abhishek Mujawadiya - avatar
2 Antworten
+ 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.
30th Jan 2021, 4:48 AM
noteve
noteve - avatar
- 1
Thanks for hint But show me please coding of this question
31st Jan 2021, 3:17 AM
Abhishek Mujawadiya
Abhishek Mujawadiya - avatar