+ 1

Question given at the discription

You 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 Explanation: The first bus will transport 50 passengers, leaving 126-50=76 in the station. The next one will leave 26 in the station, thus, the last bus will take all of the 26 passengers, having 50-26=24 seats left empty.

14th Feb 2023, 3:53 PM
Muhammad Rafique
Muhammad Rafique - avatar
2 odpowiedzi
+ 7
Muhammad Rafique > we are missing the programming language you are going to use > please link your code here
14th Feb 2023, 4:19 PM
Lothar
Lothar - avatar
+ 2
Muhammad Rafique did you look at the explanation as it explains exactly how to code this problem and it even gives the answer ... p = 126%50 s = 50-p
14th Feb 2023, 4:18 PM
BroFar
BroFar - avatar