+ 1
Help!! This is transportation exercise from c++ course.
#include <iostream> using namespace std; int main() { //your code goes here int no.of passengers = {}; cin >> no.of passengers %50; return 0; }
6 Respostas
+ 5
Otaku Gamer
Am not sure what you asking.. try to explain it!
Sameer Don't give the user exact solution! Even if you are helping him then try to explain it
+ 2
Otaku Gamer the challenge asks for the empty seats, not the occupied seats.
You can't use space or special characters in variable names. And put input and computation in different lines
+ 2
A simple three lines of code implementation.
First, you use the modulus function to find the remainder, which are the passengers on the last bus.
Then, to find the empty seats, you use bus capacity minus away the last passengers.
https://code.sololearn.com/cAsIKRZH3quK/?ref=app
+ 1
Otaku Gamer
Well excercises are given to learn coding and build logic but if you ask for help without doing anything then you can't learn. So I will suggest if you want to learn then try self.
0
Just write this
Int x;
cin>>x;
cout<<50-x%50;
done
- 2
Sameer you shouldn't give out complete codes, that has very little learning effect
And your code isn't even correct