Paint Cost - Code Coach | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Paint Cost - Code Coach

Hello, May you please tell me what’s wrong with this code. I’m getting only 3 out of 5 test cases right. #include <iostream> #include <math.h> using namespace std; int main() { double paints, cost, temp, tcost; cin>>paints; cost = paints*5; temp = (cost+40)*0.1; tcost = cost + 40 + temp; cout<<round(tcost); return 0; }

30th Dec 2019, 8:25 PM
Danyal Ahmed
Danyal Ahmed - avatar
2 Answers
30th Dec 2019, 9:02 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Thank you again Denise! really appreciate the help!! 🙏🏻
31st Dec 2019, 3:47 AM
Danyal Ahmed
Danyal Ahmed - avatar