Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C# program that can be use to determine the tip amount that should be ad

ID: 3888670 • Letter: W

Question

Write a C# program that can be use to determine the tip amount that should be added to a restaurant charge. Allow the user to input the restaurant charge, before taxes. Produce output showing the calculated value including the total amount due for both the 15% and 20% tips. Tax of 9% should be added to the bill before the tip is determined. Write appropriate methods for your solution. Display subtotals showing the amount owned prior to applying a tip. Show each tip amount and the total with each tip amount. Be sure to provide labels for values and numbers align them. Write a C# program that can be use to determine the tip amount that should be added to a restaurant charge. Allow the user to input the restaurant charge, before taxes. Produce output showing the calculated value including the total amount due for both the 15% and 20% tips. Tax of 9% should be added to the bill before the tip is determined. Write appropriate methods for your solution. Display subtotals showing the amount owned prior to applying a tip. Show each tip amount and the total with each tip amount. Be sure to provide labels for values and numbers align them.

Explanation / Answer

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Enter bill amount : ");
            double n = Convert.ToDouble(Console.ReadLine());
            n = n + 0.09 * n;
            Console.WriteLine("Subtotal          :" + n);
            double tip1 = 0.15 * n;
            double tip2 = 0.2 * n;
            Console.WriteLine("Tip with 15%      :" + tip1);
            Console.WriteLine("Tip with 20%      :" + tip2);
            double total1 = n + tip1;
            double total2 = n + tip2;
            Console.WriteLine("Total with 15% tip:" + total1);
            Console.WriteLine("Total with 20% tip:" + total2);

        }
    }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote