+ 2

Help please!!! Tests 3 and 4 failed

#include <iostream> using namespace std; int main() { int cost; int paint; cin>>paint; cost=(paint*5+40)+((paint*5+40)/10); cout<<cost; return 0; }

23rd Feb 2020, 5:42 AM
Hl1v
Hl1v - avatar
4 ответов
23rd Feb 2020, 5:50 AM
Arsenic
Arsenic - avatar
+ 1
Thank
23rd Feb 2020, 7:01 AM
Hl1v
Hl1v - avatar
+ 1
// Paint costs in c++ #include <iostream> #include <cmath> using namespace std; int main() { int numberOfcolor,total_cost; double cost,tax; cin>>numberOfcolor; cost=(numberOfcolor*5)+40; tax=cost/10; total_cost=round(tax)+cost; cout<<total_cost; }
24th Feb 2020, 1:00 PM
Harshit
Harshit - avatar
0
23rd Feb 2020, 3:18 PM
Shamini Selvaraj
Shamini Selvaraj - avatar