+ 1
https://www.sololearn.com/coach/22?ref=app What mistake of this code
Paint cost in c++
6 Respostas
+ 6
Devi Prabha.S you have to declare variables of float type except
Input number
And it has been specified in the output format that the result should be rounded to next whole number.
So you can use roundf() function of math.h
+ 4
I am saying that copy ur code and then post it here
Not the link
+ 3
Post ur code not link as it will show your code
+ 1
What mistake of this code
+ 1
#include <iostream>
using namespace std;
int main(){
int n,ans,total;
float tax;
cin>>n;
ans=(n*5)+40;
tax=ans/10;
total=ans+tax;
cout<<total;
return 0;
}