0

Transportation Quiz

Man, I’m dying with this. My head is burning. More explanation please

20th Aug 2022, 8:45 AM
Nett
Nett - avatar
5 RĂ©ponses
+ 3
What is the temprature of head now? 😀😀
20th Aug 2022, 10:24 AM
AÍąJ
AÍąJ - avatar
+ 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
Sreeju - avatar
+ 1
😅😅 thanks for helping guy. Still need sometimes to restart ma brain
20th Aug 2022, 10:25 AM
Nett
Nett - avatar
0
some tasks are really able to move the brains in the literal sense 😆
20th Aug 2022, 9:34 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
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
Dragon RB - avatar