0

I'm having trouble in solving the transportation quiz. I need to write a code were the output from the code output can answer or

12th Apr 2021, 6:56 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
12 ответов
+ 1
do not specify that x is equal to 138. just make it so that it seems like the user himself must enter this value
12th Apr 2021, 7:49 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Please, for better help, show us your code attempt
12th Apr 2021, 7:32 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
you should not specify direct values for the number of passengers. leave it to the test program. it will generate and substitute the values it needs.
12th Apr 2021, 7:44 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
and you didn't fulfill the second point from my suggestion to you
12th Apr 2021, 7:46 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Ohhh okay thanks a lot sir. Now I got it
12th Apr 2021, 7:50 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
+ 1
you can write to me in private messages here. and I do not teach unfortunately c++, I teach javascript, python and Ruby. Therefore, I can only suggest the solution algorithm, but not the syntax
12th Apr 2021, 8:00 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Hi! you should: 1. from the total number of passengers, subtract the number of passengers who can take away full buses (the bus can accommodate 50 people). you will have a number that is obviously less than 50 2. from the total number of seats in the bus, you need to subtract the remaining number of passengers and this will be the number of available seats. 3. display the result on the screen.
12th Apr 2021, 6:58 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
I know how to answer it, but I'm having trouble in writing the codes, I have tried many different types of code but it can't answer the all the column at once
12th Apr 2021, 7:31 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
0
The bellow is my type of code to answer the problem Int x = 138; x = x % 50; count << x << endl; Int x = 119; x = x % 50; count << x << endl; I have answered like this but the output only fill the case number 1 column with: 38 19 It didn't fill the case number 2 column..
12th Apr 2021, 7:41 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
0
#include <iostream> using namespace std; int main() { //your code goes here int x = 138; x = x % 50; cout << x << endl; return 0; }
12th Apr 2021, 7:43 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
0
Sir can I get your WhatsApp number? So that I can ask more about coding, I'm new here, and I think I still need some assistance..
12th Apr 2021, 7:56 AM
Leao Martins Fernandes de Carvalho
Leao Martins Fernandes de Carvalho - avatar
0
I tried for an hour to solve that.... We don't need to give any integer, only need a constant 50. #include<iostream> Using namespace std; Int main() { Int x, y, z; Cin>>x; y=x%50; z=50-y; Cout<<z; return 0; }
13th Apr 2021, 6:04 PM
Insecure Rush
Insecure Rush - avatar