0

You are making a program for a bus service. A bus can transport 50 passengers at once. Given the number of passengers waitin

Why this is wrong? Actually my answer was same as the expected output, but it shown as wrong! What can i do?

5th Nov 2021, 12:27 PM
Amritha T Rathinam
Amritha T Rathinam - avatar
8 Answers
0
Amritha T Rathinam You don't have to print anything except final result because test cases outputs only understand final result. Anything which you print test cases output doesn't understand.
5th Nov 2021, 1:35 PM
A͢J
A͢J - avatar
+ 3
Don't print any message. Not for input and not for output. Do only print the result (seats). All other output will be interpreted as wrong output.
5th Nov 2021, 1:28 PM
Coding Cat
Coding Cat - avatar
+ 2
Why did you spam the same question four different times?
5th Nov 2021, 12:31 PM
Billy Beagle
+ 2
Okay Brother! Thnk Yu So Much!!
5th Nov 2021, 1:35 PM
Amritha T Rathinam
Amritha T Rathinam - avatar
+ 2
Okay Brother now only i understood! Actually I am new here! Thnaks to everyone ✌🏻❤️
5th Nov 2021, 1:37 PM
Amritha T Rathinam
Amritha T Rathinam - avatar
+ 1
Sorry, it was caused because of some network issue
5th Nov 2021, 12:34 PM
Amritha T Rathinam
Amritha T Rathinam - avatar
+ 1
Amritha T Rathinam Where is your code?
5th Nov 2021, 12:52 PM
A͢J
A͢J - avatar
+ 1
#include <iostream> using namespace std; int main() { //your code goes here int n,bus=0,seat=0; cout<<"Enter the total number of passengers:"<<endl; cin>>n; bus=n%50; seat=50-bus; cout<<"The last bus will have"<<seat<<"seats"<<endl; return 0; }
5th Nov 2021, 1:10 PM
Amritha T Rathinam
Amritha T Rathinam - avatar