Why am I failing (Paint costs) | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Why am I failing (Paint costs)

#include <iostream> #include <cmath> using namespace std; int main() { int colors; cin >> colors; double cost = 40 + (5*colors); cost += cost/10; cout << ceil(cost); return 0; } 5th test won't work

21st Jul 2023, 3:44 PM
Farah Alkayyem
Farah Alkayyem - avatar
1 Resposta
+ 6
cout << (int) round(cost);
21st Jul 2023, 3:51 PM
AĶ¢J
AĶ¢J - avatar