0
This code is for task Paint Costs. Test 3 crashes. Does anybody know why? I can't see input for Test 3.
#include <iostream> #include <cmath> using namespace std; int main() { int numOfColors,round_sum,floor_sum; double sum; cin>>numOfColors; sum=1.10*(40.00+5.00*double(numOfColors)); round_sum=round(sum); floor_sum=floor(sum); if ((round_sum-floor_sum)==1 && round_sum%2==1) { cout<<floor_sum; } else { cout<<round_sum; } return 0; }
3 Respuestas
+ 1
Maybe this could help:
https://www.sololearn.com/Discuss/2148398/?ref=app
+ 1
cout<<"Tnx, it helps";
0
Janko Jankovic You're welcome.