| Author: Dharmendra Kumar Singh 22 Feb 2011 Member Level: Gold Points : 3 (Rs 2) Voting Score: 0 |
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
|