We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Firstly, assuming your calculation is correct you are supposed to print out the exact same statement shown in the sample output, means:
"the meal cost is 15 dollars." (this must be it lol)
Secondly, depending on the PL you use, I assume it's java due to the code you have posted, it's uneccassary to put paranthesis around your multiplication since java considers that multiplication operators have precedence over addition/subtraction.
Hope this helps.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
Firstly, assuming your calculation is correct you are supposed to print out the exact same statement shown in the sample output, means: "the meal cost is 15 dollars." (this must be it lol) Secondly, depending on the PL you use, I assume it's java due to the code you have posted, it's uneccassary to put paranthesis around your multiplication since java considers that multiplication operators have precedence over addition/subtraction.
Hope this helps.