Saturday, August 3, 2013

Exercise no. 3

import java.util.*;
public class Pay {
  
    public static void main(String[] args) {  
        Scanner x= new Scanner(System.in);
      
     
        double RPH;
    double HW;
    double Absences;
    double Late;
    double Gross;
    double TD;
    double NI;


        final double SSS=175,PhilHealth=300;
     
        System.out.println("Enter RatePerHour: ");
        RPH=x.nextDouble();
      
        System.out.println("Enter HoursWorked: ");
        HW=x.nextDouble();
      
        System.out.println("Enter absences: ");
        Absences=x.nextDouble();
        Absences=Absences*5.75;
      
        System.out.println("Enter Late: ");
        Late=x.nextDouble();
        Late=Late*3.25;
        Gross=RPH*HW;
      
        System.out.println("The Gross is: "+Gross);
        TD=Absences+Late+SSS+PhilHealth;
      
        System.out.println("The Total Deduction is: "+TD);
        NI=Gross-TD;
      
        System.out.println("The Total Net Income is: "+NI);
     
     
     
    }

}


   

No comments:

Post a Comment