0

Why doesnt it work?

#include <iostream> using namespace std; int main() { //ваш код int passengers; cin >> passengers; int bus; cin >> bus; int lastBus = passengers % bus; int emptySlots = bus - lastBus; cout << emptySeats << endl; return 0; }

1st Nov 2022, 9:14 AM
Furchik
Furchik - avatar
6 ответов
+ 2
The the var bus would be a constant with value 50... Anyway, why you saying that dont works?
1st Nov 2022, 9:35 AM
KrOW
KrOW - avatar
+ 2
What your code would do? Explain
1st Nov 2022, 9:21 AM
KrOW
KrOW - avatar
+ 2
Thank you! It helped me
1st Nov 2022, 10:01 AM
Furchik
Furchik - avatar
0
Ok You have a number of passengers, who are on a bus stop. One bus can take just 50 passengers. You need to find how many empty seats will be in the last bus?
1st Nov 2022, 9:29 AM
Furchik
Furchik - avatar
0
👍🏻
1st Nov 2022, 10:05 AM
KrOW
KrOW - avatar
0
Amazing
2nd Nov 2022, 3:53 PM
Asim Farheen ⭐⭐🤺👿👿
Asim  Farheen ⭐⭐🤺👿👿 - avatar