0
How can I solve the first project in C++? "Transportation" I get confused
Please I need help
7 Respuestas
+ 1
1. your mistake is that you are trying to use the direct value of the number of passengers in the program - 126. you should not do this. create a variable for entering the number of passengers and use this variable in the final formula.
2. think about the logic of the program. you have set the number of passengers, obviously more than 50. this means that one bus will not be able to take them away... but you need to count the number of available seats in the last bus... this means that you need to somehow remove as many passengers from the total number of passengers as full buses of 50 people can take away. then you will have the passengers who will be taken away by the last bus. and you will need to subtract the number of the last passengers from the total capacity of the bus, the resulting number will be the answer(the number of available seats)
+ 2
Post your code or go through the lessons again
+ 1
Hi! Please, show us your code or describe the logic of how you would try to solve this problem
+ 1
Int a = 126;
Int b = 50;
Int c = 50;
Int d = 50;
Int e = 24;
Int sum = a - b - c - d % e;
Cout << "Sum";
Return 0;
It's always wrong, even the first practice, were it says type "C++ is cool!"
Even if the answer was already there it was still wrong
+ 1
The the input was always wrong... what does it mean?
+ 1
Ok I'll try
0
I get confused of what I am suppost to put... I'll type in what I coded in a minute...