0
Ballpark Orders - Test Case #5 fail
Hi, I passed all the tests besides the 5th one and I struggle to see the issue with my code that causes the last test to fail. Did I miss something in the challenge description? Here's my code: https://www.sololearn.com/pl/compiler-playground/c2vbQoMQGpCE Thank you, P
3 Antworten
0
there are few problems....
the Console in inside System. did you import it? I don't think so. or write it everywhere, but the recommended to import it;
after fixing some "bugs":
Operator '*' cannot be applied to operands of type 'decimal' and 'double'
I hope this helps
0
Ah, sorry. I just copied my code from VS. In the exercise I have all necessary usings.
When it comes to '*' operator, I understand that I cannot multiply decimal and double together, but in my case both sum and tax amount (0.07m) are decimals, so that shouldn't be an issue, right? Correct me if I'm wrong, but if that would be the case wouldn't all tests fail instead of the first four giving the correct output?
0
why do you need there that `m` ? that means only `money`;
I think it's easier to use a foreach loop with if-else, but for that you need a dictionary (have to import System.Collections.Generic)