+ 1
What is wrong with my C++ code (basic concept code project)?
#include <iostream> using namespace std; int main() { //your code goes here int passenger; int seats= 50- (int passenger)%50; cin>>passenger; cout<<seats<<endl; return 0; }
5 ответов
+ 3
G'day that looks pretty close.
Your input is on the line below where it needs to be, can you swap it with the algorithm line?
I think you don't need to write (int) in the algorithm line, because the variable has already been created as an int
You will find that there is a test case that needs another little tweak, but let's get it running nicely before we get to that. Ok?
Did you know you can copy+paste your code into a SoloLearn "code bit" which you can then link in these discuss chats (save it as a code bit first. Then come back here, edit your original post, use the plus in a circle icon, then select code bit, my code bits, find the one you saved).
https://www.sololearn.com/discuss/1316935/?ref=app
+ 3
HungryTradie I edited the code and solved the code project, thank you so much <3
+ 3
HungryTradie I’m not sure about that. The system only showed me the first two cases which inputted 12 and 231, the other 3 cases were hidden
+ 2
Did it pass the test where the bus was exactly full, eg passenger =150 ?