my output here needs to be 55 but it is still printing 56, and I don't know why. someone knows the reason? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

my output here needs to be 55 but it is still printing 56, and I don't know why. someone knows the reason?

the problem is to input the amount of colors u buy, charge 5$ each and added to 40$ plus 10% tax, and I need to output the rounded up amount https://code.sololearn.com/c2E2Mmh8fAnb/?ref=app

26th Jul 2022, 6:15 AM
Martin Ledezma
Martin Ledezma - avatar
1 Answer
+ 1
Ledexmar use 'round' instead of 'ceil' cout << (int) round(priceColors);
26th Jul 2022, 6:26 AM
A͢J
A͢J - avatar