Java Program For Payroll

class Payroll {

       public static void main(String[] args) {
        int empNo= 1234;          
        double basic = 15000;
        int att = 30;
        double daPercentage = 30.0/100;
        int residence_type =0;
        double cmhra,cmbasic,cmda;
        double tax,netsal,grosssal;
       
        cmbasic = basic/30*att;
        cmda = cmbasic*daPercentage;
       
              
                if(residence_type == 0)
            
            cmhra = 0;
        else if(residence_type == 1)
              cmhra =((basic)*0.1);
        else 
            cmhra = ((basic)*0.15);
       
                     
        grosssal = (cmbasic+cmhra+cmda);
        tax = ((grosssal)*0.1);
        netsal  = (grosssal - tax);
        System.out.println("The salary of the employee = " +netsal );
        
    }
}             
                
  
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Web Developer, Student and Mechanical Engineer. He Enjoys writing articles, Blogging, Solving Errors and Social Networking. Feel Free to let me know any of your concerns about hacking or let me know if you need any more methods on hacking anything. Enjoy Learning

No comments:

Post a Comment