package assignment1;
import java.util.*;
import java.io.*;
public class Assignment1 {
public static void main(String[] args) throws Exception{
DataInputStream name1 = new DataInputStream(System.in);
Scanner input = new Scanner(System.in);
int salary;
int tax;
int total;
double tax1 = .20;
System.out.print("Enter Employee's Name: ");
String name=name1.readLine();
System.out.print("Enter Employee's Hours of Work: ");
int i=input.nextInt();
System.out.print("Enter Employee's Rate: ");
int d=input.nextInt();
salary = i * d;
tax = (int) (salary * tax1);
total = salary - tax;
System.out.println("***Salary of Employee***");
System.out.println("Employee's Name: " +name);
System.out.println("Employee's Hours of Work: " +i);
System.out.println("Employee's Rate: " +d);
System.out.println("Employee's Tax: " +tax);
System.out.println("Employee's Gross Salary: " +salary);
System.out.println("Employee's Total Salary: " +total);
}
}
Just nothing. I just want to share.
This post has been edited by jon.kiparsky: 02 October 2012 - 09:48 AM
Reason for edit:: use the code tags, please

New Topic/Question
Reply


MultiQuote



|