Transportation Quiz | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
0

# Transportation Quiz

Man, Iโm dying with this. My head is burning. More explanation please

20th Aug 2022, 8:45 AM
Nett
+ 3
What is the temprature of head now? ๐๐
20th Aug 2022, 10:24 AM
AอขJ
+ 2
#include <iostream> using namespace std; int main() { //your code goes here int waitingpassangers; cin >> waitingpassangers; int buscapacity = 50; int peopleinthelastbus = waitingpassangers % buscapacity; int emptyseats = 50 - peopleinthelastbus; cout << emptyseats; return 0; } https://code.sololearn.com/cJYedjMv5VBS/?ref=app
20th Aug 2022, 8:54 AM
Sreeju
+ 1
๐๐ thanks for helping guy. Still need sometimes to restart ma brain
20th Aug 2022, 10:25 AM
Nett
0
some tasks are really able to move the brains in the literal sense ๐
20th Aug 2022, 9:34 AM
Yaroslav Vernigora
0
#include <iostream> using namespace std; int main() { //your code goes here int passengers; cin >> passengers ; int seat = passengers % 50; if(passengers >= 50) { if(seat > 50) { cout << seat << endl; } } if(seat < 50) { cout << 50 - seat << endl; } return 0; } I tried the module myself without copying the other people's code. And this module force me to use the if statement to get this correct.(I know that you can do this without the if statement, but using upper lesson to solve the previous module helps sometimes) I used the other's people code to do this module, but after I learned c++ for a long time this took me many tries to make my own code correct because I don't really understand math logic XD
15th Sep 2022, 1:25 PM
Dragon RB