Hey guys, I need some help here please.
I’m not sure how to make a formula for the amount of people that are left over, that don’t fit on the bus. How do you work that out using “if - else” and “greater than” or “less than” functions?
Essentially i’m stuck: I need a formula to work out how to calculate the amount that the bus fills up that’s larger than 30 (it needs to return ANY number larger than 30, not just “2” as the given. Getting the console to return “2 must walk” is easy if you cheat). But I want it to calculate any number I input for stops 1, 2 and 3, and then calculate the excess amount of people who don’t fit on the bus.
This is my current code but it doesn’t work (obviously). The code in line 41 is wrong, I know it, but how do I calculate the overflow?