Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 435 Bytes

File metadata and controls

15 lines (13 loc) · 435 Bytes

class Solution { public static void Main(string[] args) { var mealCost = double.Parse(Console.ReadLine()); var tipPercent = int.Parse(Console.ReadLine()); var taxPercent = int.Parse(Console.ReadLine());

    var tip = tipPercent * mealCost / 100;
    var tax = taxPercent * mealCost / 100;

    var totalCost = Math.Round(tip + tax + mealCost);
    Console.WriteLine(totalCost);
}

}