+ 1
Hello guys can u give me a sign of what's wrong in this code ? All cases r true except the fourth one
3 Answers
+ 2
what about "Nachos"?
I don't see it in your switch statement
+ 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
+ 1
I forgot the Nachos statment
Thank u a lot âĄ