+ 2

Can anyone tell what's wrong in this code? Thank you

https://code.sololearn.com/czfQ5Mnc4fW0/?ref=app

8th Jul 2022, 11:15 AM
Tiya
Tiya - avatar
5 Respuestas
+ 2
You are using all int data type values so you miss fraction values. Use double type variables instead of int. And there is no need to check for input 0 or 1. If input is greater than 1 then apply discount else don't. hope it helps..
8th Jul 2022, 11:47 AM
Jayakrishna 🇮🇳
+ 2
Your code is running. If I enter a number, it outputs another number. Can you describe what the problem is? What is the task your program should accomplish? What is the input you give, which produces wrong output? What should be the correct output?
8th Jul 2022, 11:21 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Don't add code or links in question place. It won't work. Add in description place.. You can see like this https://code.sololearn.com/czfQ5Mnc4fW0/?ref=app code working fine.. Are you getting any wrong output? what is your expected output?.
8th Jul 2022, 11:28 AM
Jayakrishna 🇮🇳
+ 1
There is a kaleidoscope question in the practice section, if input is more than 1 then 7% tax adds and 10 % discount and if input is one then only tax adds and input is the number of kaleidoscopes a person buy and each kaleidoscope costs 5 rupees
8th Jul 2022, 11:29 AM
Tiya
Tiya - avatar
- 2
Hy
8th Jul 2022, 5:19 PM
Raja Sonkar
Raja Sonkar - avatar