+ 1

I am having trouble solving the transportation problem. The math seems to elude me. I'm having a duh moment. Any help?

12th Feb 2021, 5:03 AM
Michelle Davis
Michelle Davis - avatar
5 Answers
+ 2
Michelle Davis just basic calculation error subtract 50 from y int y = 50 - x % 50
12th Feb 2021, 5:14 AM
vinci
+ 1
Show your attempt please
12th Feb 2021, 5:04 AM
vinci
+ 1
Int x; cin >> x; int y = x % 50; cout << y;
12th Feb 2021, 5:09 AM
Michelle Davis
Michelle Davis - avatar
+ 1
Thanks. burnt brain today. I had statistics class earlier . don't like statistics.
12th Feb 2021, 5:16 AM
Michelle Davis
Michelle Davis - avatar
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 👍
14th Feb 2021, 1:20 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar