0

9.2 code coach C++

Having trouble solving all test cases at once, I can solve for each test case individually but can’t pull them all off. What am I missing? Should I add an if statement or something. For example I will solve the first part to get an output of 8. How to I get the other outputs as well? I’m a newbie so bare with me lol.

20th May 2021, 3:44 PM
Jax
10 Respuestas
+ 3
A common mistake is to hard code the input values. Remove the hard-coded assignment to crabs. Code Coach will supply the input values through console input when you run the tests.
20th May 2021, 4:15 PM
Brian
Brian - avatar
+ 1
Post your question please
20th May 2021, 4:13 PM
Atul [Inactive]
0
Show your code
20th May 2021, 3:50 PM
Jerry Hobby
Jerry Hobby - avatar
0
As well as the question too
20th May 2021, 3:51 PM
Atul [Inactive]
0
#include <iostream> using namespace std; int main() { int crabs; int dish; cin >> crabs; crabs= 25; dish= crabs/3; cout<<dish<<endl; return 0; }
20th May 2021, 4:12 PM
Jax
0
This is what do to fulfill the first part but the other 2....im stumped.
20th May 2021, 4:12 PM
Jax
0
How do I properly code all 3 of the test cases at once? I only complete the first one properly.
20th May 2021, 4:16 PM
Jax
0
Can someone show me some code of how it should look?
20th May 2021, 4:17 PM
Jax
0
Ahh ok
20th May 2021, 4:19 PM
Jax