-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tax_Calculator.cs
50 lines (47 loc) · 1.9 KB
/
Tax_Calculator.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
namespace Tax_Calculator
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welcome to Sherlena's tax calculator");
Console.WriteLine();
TaxCalcMenu();
Console.WriteLine();
Console.WriteLine("Enter the industry the payment is for: ");
string option = Console.ReadLine();
Console.WriteLine();
switch (option)
{
case "1": {
Console.WriteLine("Food & Beverages tax Calculator");
Console.WriteLine();
Console.WriteLine("Enter the cost of the product: ");
double cost = Convert.ToDouble(Console.ReadLine());
double costwithgst = (((cost / 100) * 110) / 100) * 107;
Console.WriteLine("The cost of the $" + cost + " is " + costwithgst + " after the 10% service charge and 7% gst");
break;
}
case "2": {
Console.WriteLine("Other Industries tax Calculator");
Console.WriteLine();
Console.WriteLine("Enter the cost of the product: ");
double cost = Convert.ToDouble(Console.ReadLine());
double costwithgst = (cost / 100) * 107;
Console.WriteLine("The cost of the $" + cost + " is " + costwithgst + " after the 7% gst");
break;
}
default: {
Console.WriteLine("Please enter a valid choice");
break;
}
}
}
static void TaxCalcMenu()
{
Console.WriteLine("1. Food & Beverages");
Console.WriteLine("2. Other Industries");
}
}
}