using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
double yearToDate = 0.0000;
Console.WriteLine("Please enter your Gross Pay:");
double @gross = Double.Parse(Console.ReadLine());
Console.WriteLine("Are you an Australian Resident? (Y/N)");
if (Console.ReadLine() == "Y")
CalculateResidentialTax(@gross);
Console.WriteLine("Enter your Year-to-Date pay amount: ");
@yearToDate = Double.Parse(Console.ReadLine());
CalculateWorkingHolidayTax(@gross, @yearToDate);
public static void CalculateResidentialTax(double @gross)
if (@gross > -1 && @gross <= 72)
double tax = (@gross * 0.19) - 0.19;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (@gross > 72 && @gross <= 361)
double tax = (@gross * 0.2342) - 3.231;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (@gross > 361 && @gross <= 932)
double tax = (@gross * 0.3477) - 44.2476;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (@gross > 932 && @gross <= 1380)
double tax = (@gross * 0.345) - 41.732;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (@gross > 1380 && @gross <= 3111)
double tax = (@gross * 0.39) - 103.8657;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (@gross > 3111 && @gross <= 999999)
double tax = (@gross * 0.47) - 352.7888;
Console.WriteLine("Tax: {0}", tax.ToString());
Console.WriteLine("Invalid Input!!");
public static void CalculateWorkingHolidayTax(double @gross, double @yearToDate)
double totalGrossAmount = @gross + @yearToDate;
if (totalGrossAmount > -1 && totalGrossAmount <= 37000)
double tax = totalGrossAmount * 0.15;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (totalGrossAmount > 37000 && totalGrossAmount <= 90000)
double tax = totalGrossAmount * 0.32;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (totalGrossAmount > 90000 && totalGrossAmount <= 180000)
double tax = totalGrossAmount * 0.37;
Console.WriteLine("Tax: {0}", tax.ToString());
else if (totalGrossAmount > 180000 && totalGrossAmount <= 9999999)
double tax = totalGrossAmount * 0.45;
Console.WriteLine("Tax: {0}", tax.ToString());
public static void CsvImporter()
using(var reader = new StreamReader(@"C:\test.csv"))
List <string> listA = new List<string>();
List <string> listB = new List<string>();
while (!reader.EndOfStream)
var line = reader.ReadLine();
var values = line.Split(';');