+ 1

https://www.sololearn.com/coach/22?ref=app What mistake of this code

Paint cost in c++

24th Jun 2020, 9:18 AM
Devi Prabha.S
Devi Prabha.S - avatar
6 Respuestas
+ 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
24th Jun 2020, 9:49 AM
Ankit Yadav
Ankit Yadav - avatar
+ 4
I am saying that copy ur code and then post it here Not the link
24th Jun 2020, 9:27 AM
Ankit Yadav
Ankit Yadav - avatar
+ 3
Post ur code not link as it will show your code
24th Jun 2020, 9:22 AM
Ankit Yadav
Ankit Yadav - avatar
24th Jun 2020, 9:25 AM
Devi Prabha.S
Devi Prabha.S - avatar
+ 1
What mistake of this code
24th Jun 2020, 9:25 AM
Devi Prabha.S
Devi Prabha.S - avatar
+ 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; }
24th Jun 2020, 9:29 AM
Devi Prabha.S
Devi Prabha.S - avatar