' This program calculates an employee's take-home pay.
Option Explicit On
Option Strict On
Dim salary As Double = 950.00
Dim stateTax As Double = 0.06
Dim federalTax As Double = 0.25
Dim numDependents As Integer = 3
Dim dependentDeduction As Double = 0.02
Dim totalWithholding As Double =
Dim takeHomePay As Double =
' Calculate state tax here
System.Console.WriteLine("State Tax: $" & stateTax)
' Calculate federal tax here
System.Console.WriteLine("Federal Tax: $" & federalTax)
' Calculate dependant deduction here
System.Console.WriteLine("Dependents: $" & dependentDeduction)
' Calculate total withholding here
' Calculate take home pay here
System.Console.WriteLine("Salary: $" & salary)
System.Console.WriteLine("Take-Home Pay: $" & takeHomePay)
This is what it telling me to do:
Calculate state withholding tax at 6.0%, and calculate federal withholding tax at 25.0%.
Calculate dependent deductions at 2.0% of the employee's salary for each dependent.
Calculate total withholding.
Calculate take-home pay as salary minus total withholding plus deductions.
Can you guys check to see if I'm putting number in right. And what code I'm missing to make it work. And please take it easy on me, I'm just learn VB for 3 weeks