+ 1

can someone explain the fist question in the c++ the project one

so I tried c++ and i don't knows it well so I kinda suck on the first project i really don't understand the question

27th Jun 2021, 3:46 PM
rahum habsy
3 ответов
+ 3
Given a number of passengers and a bus that can carry 50 people at once, the Transportation project asks you to determine the number of free seats on the final bus. Since you know the capacity of a bus, the number of free seats is simply the number of people on the last bus subtracted from the total capacity (50). So what you really need to determine is the number of people on the last bus. With some thinking, you will notice that number remains as the rest when dividing the total number of people by the bus capacity (not using fractions). To calculate the rest (modulo) of a division, C++ uses the % operator, which you should have learned about earlier in the course. That leaves you with two simple equations, as well as the necessary input and output operations to be taken care of. But all of this, as well as an example, can be found in the task description. If this doesn't clarify your doubts, it might be helpful to be more clear as to what you don't understand.
27th Jun 2021, 5:30 PM
Shadow
Shadow - avatar
+ 1
no I mean the project in the c++
27th Jun 2021, 4:07 PM
rahum habsy
0
where is the assignment, i wanna steal it :D and also show your attempt so we would help you
27th Jun 2021, 4:06 PM
Rellot's screwdriver
Rellot's screwdriver - avatar