+ 4

What is the problem with this code?

I try to complete the "Paint costs", but I still don't know why I get two test cases wrong. Can anyone correct my code and explain to me? Thank you very much. My code: #include <iostream> using namespace std; int main() { int n; cin >> n; cout << n*5+40+(n*5+40)/10; return 0; }

6th Feb 2022, 1:40 AM
adeadaccount
3 Answers
+ 6
G'day Huy082125 great attempt. Have you read the instructions again? Is there something you aren't ensuring? I have been copy/pasting the instructions into my code as a comment, then checking I have formatting and etc correct. PS: I know which instruction you have overlooked, let me know if you can't work it out!
6th Feb 2022, 2:37 AM
HungryTradie
HungryTradie - avatar
+ 5
I think I know where I got it wrong. The output says that it has to be rounded up to the nearest whole number.
6th Feb 2022, 3:50 AM
adeadaccount