Skip to content

Instantly share code, notes, and snippets.

@jimmy087
jimmy087 / Exercise1.java
Created May 4, 2013 05:42
Simple program which calculates tax and net pay
public class Exercise1 {
public static void main(String[] args) {
java.util.Scanner input = new java.util.Scanner(System.in);
System.out.print("Enter employee name: ");
String employeeName = input.nextLine();
System.out.println("Number of hours worked: ");
int numberOfHoursWorked = input.nextInt();
System.out.println("Hourly wage rate: ");
double wageRate = input.nextDouble();
System.out.println("Enter the Federal tax rate: ");