Question: Write code that will:

• Ask the user for their tax code (A or B) and annual salary

• Display the tax the person has to pay for the year. People on tax code A have
to pay 25% of their salary in tax, those on tax code B must pay 30% if their
salary is $45,000 or less, 33% otherwise.

Example:

What is your tax code? A  

What is your annual salary? 42560  

Tax due $10,640

so my question is how do i do this in Microsoft Visual studio?  

I appreciate all the help and comments :)

Answer: 
Start a console project.

Print out with `System.Console.Write ("question?");` or `System.Console.WriteLine("question?");`

Get input with `string input = Console.ReadLine();`

Convert to required data type using functions like `int salary = int.Parse(input)`

Process according to the requirement. You will mostly use `if` to determine which rate to use.

Remember to repeat the question if the input is not correct; eg: not a number, not A or B.
This should get you started:

```
float rate;

if(ddl_Code.SelectedValue ==  "A")
{
   rate = .25F;
}
else if(ddl_Code.SelectedValue ==  "B" && Convert.ToDecimal(tb_Salary.Text) <= 45000)
{
   rate = .3F;
}
else
{
   rate = .33F;
}

tb_TaxDue.Text = Convert.ToDecimal(tb_Salary.Text) * rate;

```

This assumes you have a drop down list for Tax Code and two text boxes for Taxes due and salary.