New course! Every coder should learn Generative AI!
Try a free lesson0
You are making a program for a bus service. A bus can transport 50 passengers at once. Given the number of passengers waitin
Please help me solve it in c++ I'm a bit confused
2 Answers
+ 6
Please use search bar before posting any questions
https://www.sololearn.com/discuss/2607271/?ref=app
https://www.sololearn.com/discuss/2605697/?ref=app
https://www.sololearn.com/discuss/2600494/?ref=app
https://www.sololearn.com/discuss/2598492/?ref=app
+ 1
Say you have 45 passengers and 10 waiting
You would do
Passengers + waiting - capacity
Which will leave you 5 waiting it's pretty simple with some if statements.