Embed presentation
Download to read offline


![public float bsalcal(int gsal)
{
float da = 10 * gsal / 100;
float hra = 20 * gsal / 100;
float pf = 15 * gsal / 100;
Console.Write("nPROVIDENT FUND(PF) 15% OF GROSS SALARY{0}: ", gsal +
(da + hra) - pf);
return 0;
}
static void Main(string[] args)
{
int eid, esal;
string ename;
salary s = new salary();
Console.WriteLine("EMPLOYEE SALARY CALCULATION");
Console.WriteLine("EMPLOYEE ID:");
eid = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("EMPLOYEE NAME:");
ename = Console.ReadLine();
Console.WriteLine("EMPLOYEE GROSS SALARY:");
esal = Convert.ToInt32(Console.ReadLine());
s.dacal(esal);
s.hracal(esal);
s.pfcal(esal);
s.bsalcal(esal);
}
}
}](https://image.slidesharecdn.com/program2-210206144034/75/PROGRAMMING-USING-C-NET-SARASWATHI-RAMALINGAM-3-2048.jpg)


The document is a C# lab manual from Sri Akilandeswari Women's College that includes a program for calculating employee salary components. It defines a class called 'salary' with methods to calculate dearness allowance, house rent allowance, provident fund, and final basic salary based on gross salary input. The program prompts the user for employee details and displays the calculated allowances and deductions.


![public float bsalcal(int gsal)
{
float da = 10 * gsal / 100;
float hra = 20 * gsal / 100;
float pf = 15 * gsal / 100;
Console.Write("nPROVIDENT FUND(PF) 15% OF GROSS SALARY{0}: ", gsal +
(da + hra) - pf);
return 0;
}
static void Main(string[] args)
{
int eid, esal;
string ename;
salary s = new salary();
Console.WriteLine("EMPLOYEE SALARY CALCULATION");
Console.WriteLine("EMPLOYEE ID:");
eid = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("EMPLOYEE NAME:");
ename = Console.ReadLine();
Console.WriteLine("EMPLOYEE GROSS SALARY:");
esal = Convert.ToInt32(Console.ReadLine());
s.dacal(esal);
s.hracal(esal);
s.pfcal(esal);
s.bsalcal(esal);
}
}
}](https://image.slidesharecdn.com/program2-210206144034/75/PROGRAMMING-USING-C-NET-SARASWATHI-RAMALINGAM-3-2048.jpg)
