Hello guys can u give me a sign of what's wrong in this code ? All cases r true except the fourth one | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hello guys can u give me a sign of what's wrong in this code ? All cases r true except the fourth one

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

17th May 2021, 11:37 AM
‎Abdul Jalil
‎Abdul Jalil - avatar
3 Answers
+ 2
what about "Nachos"? I don't see it in your switch statement
17th May 2021, 12:12 PM
Rohit Kh
Rohit Kh - avatar
+ 1
By making a double division or float you will get a floating point number instead of an int . By default when java makes a division its will throw away the decimal part so that why your result was inaccurate. double total = price + (price*7)/(double)100; And by providing the same test Pizza Cheeseburger Water Popcorn you'll get 26.75
17th May 2021, 12:15 PM
Alpha Diallo
Alpha Diallo - avatar
+ 1
I forgot the Nachos statment Thank u a lot ♡
17th May 2021, 12:20 PM
‎Abdul Jalil
‎Abdul Jalil - avatar