0
Can any one help me in this code in c++.
#include <iostream> using namespace std; int naughty(int a){ int total=a*5+40; int percentage=total*10/100; int all=percentage+total; cout <<all; } int main() { int colors; cin >>colors; naughty (colors); return 0; } This is the code of the problem (The paint costs). I have just tried this as using functions.
4 Answers
+ 3
RAVIKIRAN.D U need to Have a check for rounding up to the nearest whole number like :
if(total%10<5)
...cout<<all;
else
...cout<<all+1;
0
Ohh thanks alot
0
RAVIKIRAN.D Wlcm



