+ 1
I am having trouble solving the transportation problem. The math seems to elude me. I'm having a duh moment. Any help?
5 Respostas
+ 2
Michelle Davis just basic calculation error subtract 50 from y
int y = 50 - x % 50
+ 1
Show your attempt please
+ 1
Int x;
cin >> x;
int y = x % 50;
cout << y;
+ 1
Thanks. burnt brain today. I had statistics class earlier
. don't like statistics.
0
#include <iostream>
using namespace std;
int main() {
int passengers, seats;
cin>>passengers;
while (passengers > 50) {
passengers %= 50;
}
seats = 50 - passengers;
cout<< seats;
return 0;
}
Try this
Maybe helps you 👍