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

Complete the algorithm table to calculate a tip to leave a waiter. The program s

ID: 3843978 • Letter: C

Question

Complete the algorithm table to calculate a tip to leave a waiter. The program should subtract the liquor and 7% tax from the total bill and then calculate the tip (using a percentage) on the remainder.  The user will enter the total bill, liquor amount, and tip percent. Desk check using $100 as total bill, $20 for liquor, and a 20% tip. When finished submit this document (not zipped) into Blackboard and submit hard copy in class. Field names are descriptive names in camel case.

See Sample Algorithm table.

for C#

Explanation / Answer

Program in C# for tip

using System;

public class Bill
{
double total_bill, liquor, tip, tip_amount;
   public static void Main()
   {
Bill bill = new Bill();
bill.Input();
bill.tip_amount = (bill.total_bill - (bill.liquor + (bill.total_bill*0.07) ))*(bill.tip/100);
Console.WriteLine("Tip = {0}",bill.tip_amount);
  
   }
   public void Input(){
   Console.WriteLine("Enter the total bill : ");
   total_bill = Convert.ToDouble(Console.ReadLine());
   Console.WriteLine("Enter the liquor amount : ");
   liquor = Convert.ToDouble(Console.ReadLine());
   Console.WriteLine("Enter the tip in % : ");
   tip = Convert.ToDouble(Console.ReadLine());
   }
}

If you require algorithm instead then notify in comment

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