Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

i need help

Name: Anonymous 2010-10-17 3:13

hey /g/uy's i need a little help with this code for my coding class
java. I dont know the code to be able to type in a persons name
i need to input a person's name then be able to press enter and input a numbe

import java.util.Scanner;

public class Taxes{
public static void main(String[] args){
double net;
Scanner input = new Scanner(System.in);
System.out.println("Enter employee name: ");
System.out.println("Enter employee gross pay: ");
name = input.nextDouble();

final double fed = grossPay * .15;
final double state = grossPay * .035;
final double social = grossPay * .0575;
final double medicare = grossPay * .0275;
final double pension = grossPay * .05;
final double health = 75.00;

net = grossPay - fed - state - social - medicare - pension - health;

System.out.println("\t Gross Amount: " + grossPay + "\n" +
"\t Federal Tax: " + fed + "\n" +
"\t State Tax: " + state + "\n" +
"\t Social Security Tax: " + social + "\n" +
"\t Medicare/Medicaid Tax: " + medicare + "\n" +
"\t Pension Plan: " + pension + "\n" +
"\t Health Insurance: $" + 75 + "\n" +
"\t Net Pay: $" + net + "\n");
}
}

Name: Anonymous 2010-10-17 15:37

>>14
thanks! ill be sure to come back with moar stupid questions!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List