11 Code Project - Question | Sololearn: Learn to code for FREE!
- 3

11 Code Project - Question

Update: ItÔÇÖs a new day and I got it! :) And thanks for the help to all!! _____________ Hey! :) Maybe my question is dumbÔÇŽ but: Can somebody help me with ÔÇť11 Code ProjectÔÇŁ? :( Thanks in advance! This was my ideaÔÇŽ [ÔÇŽ]

3rd Mar 2022, 1:04 AM
Jeremy
Jeremy  - avatar
29 Antworten
+ 8
Jeremy only 50 passengers can travel at the time so if total passengers are 126 then bus can take 3 round (50 * 2 + 26 * 1) so on 3rd round (50 - 26 = 24) seats will be left. Here 26 is a reminder and how you can get this, by using modulus operator (%) so here 126 % 50 = 26 now subtract this 26 from 50 to get left seats. So here is solution: int maxSeats = 50; cout << maxSeats - passengers % maxSeats; where passengers is input
3rd Mar 2022, 3:32 AM
A͢J
A͢J - avatar
+ 6
Solo for more explanation you can click on Follow button in my profile section. ­čśâ­čśâ
3rd Mar 2022, 5:39 AM
A͢J
A͢J - avatar
+ 4
You must assign the user input to the WaitingPe variable.
3rd Mar 2022, 1:28 AM
Solo
Solo - avatar
+ 3
A═óJ, ah, so that's how it works! Ôś║´ŞĆ And then I think why I have only 800 subscribers in four years, so I'm stupid. Thanks, now I know. Maybe I'll get myself 13 thousand as well.­čśâ
3rd Mar 2022, 5:49 AM
Solo
Solo - avatar
+ 3
Manav Roy - So how does your blog make you money? Ôś║´ŞĆ
3rd Mar 2022, 2:21 PM
Solo
Solo - avatar
+ 2
Read the lesson and this assignment carefully. The result should be one, not three like yours.
3rd Mar 2022, 1:37 AM
Solo
Solo - avatar
+ 2
Think about how to write a program so that it calculates for any value, and not just when it is equal to 126
3rd Mar 2022, 1:40 AM
Solo
Solo - avatar
+ 2
I could give you ready-made solutions for all tasks, but the question is: "how then will you find out about your learning gaps?"
3rd Mar 2022, 1:49 AM
Solo
Solo - avatar
+ 2
Go back to the lesson about working with variables.
3rd Mar 2022, 1:51 AM
Solo
Solo - avatar
+ 2
Show me your next attempt, taking into account my remarks.
3rd Mar 2022, 2:09 AM
Solo
Solo - avatar
+ 2
You should not add anything from yourself like this: cout << "Anzahl der Wartenden: \n"; When entering data, you do not need an endl statement, it should be set if necessary to output data: cin >> LeuteAnHalte; you do not need any cycles, since you have not yet completed them, and you are given tasks to test your knowledge of the material in this section. When outputting data, the arrows are directed from the variable: "<<". Bug: cout >> Bustour2 >> endl;
3rd Mar 2022, 2:29 AM
Solo
Solo - avatar
+ 2
What does the operator "%" do?
3rd Mar 2022, 2:38 AM
Solo
Solo - avatar
+ 2
I'm not asking you what the result is when you use the modulo division operator "%", I basically want to know what you know about this operator, how it works. What is the result if 126%50?
3rd Mar 2022, 3:03 AM
Solo
Solo - avatar
+ 2
A═óJ, it's good that you are so responsive. But at least you could explain to Jeremy how it works? Maybe at the same time you will transfer your monthly salary to me? Ôś║´ŞĆ Then and don't need to study ­čĄú
3rd Mar 2022, 4:04 AM
Solo
Solo - avatar
+ 2
ÔÖż´ŞĆ D Shah ÔÖż´ŞĆ , only turtles? Ôś║´ŞĆ
3rd Mar 2022, 4:53 AM
Solo
Solo - avatar
+ 2
Manav Roy , A͢J , Solo Thank you all!! Today is a new day and I got it. Now I understand. Thanks to all! :)
3rd Mar 2022, 9:54 AM
Jeremy
Jeremy  - avatar
+ 1
#include <iostream> using namespace std; int main() { //your code goes here int MaxPlaetze = 50; int LeuteAnHalte; cout << "Anzahl der Wartenden: \n"; cin >> LeuteAnHalte >> endl; int Bustour1 = LeuteAnHalte - MaxPlaetze; int Bustour2 = Bustour1 - MaxPlaetze; cout >> Bustour2 >> endl; return 0; }
3rd Mar 2022, 2:15 AM
Jeremy
Jeremy  - avatar
+ 1
Jeremy, happy for you! ­čĹĆ ­čĹĆ ­čĹĆ So can you now answer my last question? ­čśÄ
3rd Mar 2022, 12:19 PM
Solo
Solo - avatar
+ 1
Manav Roy, A═óJ is not joking, he has 13.5K subscribers Ôś║´ŞĆ We should learn from him. You helped a lot by writing the task. You should have added a hint here from the marked blockÔÜá´ŞĆ, because many people do not pay attention to it at all.Ôś║´ŞĆ
3rd Mar 2022, 12:41 PM
Solo
Solo - avatar
+ 1
Udar
4th Mar 2022, 11:17 AM
DavroN Husanov