You must Sign In to post a response.
  • Category: Software

    How to write a program in C# to calculate DA, HRA and PF of an Employee in a company?

    Write a program in C# to calculate DA, HRA and PF of an Employee in a company?
  • #65117
    The program for calculating DA, HRA and PF of an Employee in a company using c# is as follows.


    using system;
    class salary
    {
    string ename;
    float bsal; hra; da; pf;
    void read();
    {
    console.WriteLine("Enter the Employee Name");
    bsal=float.pase(console.ReadLine());
    }
    float sal()
    {
    float nsal
    hra=20*bsal/100;
    da=10*bsal/100;
    pf=15*bsal/100;
    gsal=bsal+da+hra+pf;
    return gsal
    }
    static void main()
    {
    salary s=new salary();
    s.read();
    float n=s.cal();
    console.WriteLine("Gross Salary is",+gsal);
    }
    }



    I hope this will be useful for you.

    Dharmendra Singh


Sign In to post your comments