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.
You would want to do this in a more effient way but broke down how each one was caculated in C#.
// Get the Taxdoubletax=(meal_cost*tax_percent)/100;// Get the Tipdoubletip=(meal_cost*tip_percent/100);// Total CostdoubletotalCost=meal_cost+tax+tip;// Round the total cost and output to consoleConsole.WriteLine("The total meal cost is "+Math.Round(totalCost)+" dollars.");
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 →
You would want to do this in a more effient way but broke down how each one was caculated in C#.