- 5

C++

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.

15th Jul 2021, 11:52 PM
Solomon Fiaku
2 Réponses
+ 3
If you just copy the task description, nobody really knows what your issue is. Do you not understand something about the requirements? Are you stuck somewhere in the code? If so, please post your attempt, and specify your question. Tips for asking questions in a Q&A forum: https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community
16th Jul 2021, 6:49 AM
Shadow
Shadow - avatar
0
Ok thannk you
16th Jul 2021, 7:11 AM
Solomon Fiaku