Search This Blog

Sunday 17 August 2014

09. JSP Program to Evaluate Salary Details of an Employee.

<!-- 09.JSP program to evaluate salary details of an employee. -->
<html>
<body bgcolor="beige">
<%
    String ename="Dinesh";
    String des="Manager";
    double bsal=20000;
    double ta=10;
    double da=30;
    double hra=10;
    double pf=10;
    double lic=15;
    double allowance;
    double deduction;
    double gsal;
    double netsal;

    allowance = (bsal*ta)/100 + (bsal*da)/100 + (bsal*hra)/100;
    deduction = (bsal*pf)/100 + (bsal*lic)/100;
    gsal = bsal + allowance;
    netsal = gsal - deduction;

%>
    <center>
    <h2> JSP Program to Evaluate Salary Details of an Employee</h2>
  
    <table border=2 cellpadding=5 bordercolor="Blue" bgcolor=orange height=400 width=200>
    <caption><h2>Employee Details</h2></caption>
    <tr><td bgcolor="red">Name</td> <td><%=ename%></td></tr>
    <tr><td>Designation</td> <td><%=des%></td></tr>
    <tr><td>Basic Salary</td> <td><%=bsal%></td></tr>
    <tr><td>Allowance</td> <td><%=allowance%></td></tr>
    <tr><td>Deduction</td> <td><%=deduction%></td></tr>
    <tr><td>Gross Salary</td> <td><%=gsal%></td></tr>
    <tr><td>Net Salary</td> <td><%=netsal%></td></tr>

    </table>
    </center>

</body>
</html>

No comments :

Post a Comment

FREE Hit Counters