Need help in solving Paint costs | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Need help in solving Paint costs

#include <iostream> #include <cmath> using namespace std; int main() { double numcolor,costcolor,tax,totalcost; cin >> numcolor ; costcolor = (5.00 * numcolor)+ 40.00; tax = (0.1) * costcolor; totalcost = ceil(costcolor + tax); cout << totalcost ; return 0; } Can i know what is the problem in this code.

11th Sep 2020, 2:09 PM
Shravan Mathapati
Shravan Mathapati - avatar
3 Answers
+ 2
Steven M Arsenic thanks guys helped me alot
11th Sep 2020, 3:30 PM
Shravan Mathapati
Shravan Mathapati - avatar
+ 1
//try something like this cout<<int(totalcost);
11th Sep 2020, 2:23 PM
Steven M
Steven M - avatar
11th Sep 2020, 2:30 PM
Arsenic
Arsenic - avatar