using System;
class abc
{
double bs, hra, da, pf, gs;
public void sal()
{
Console.WriteLine("Basic salary of employee : ");
bs = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("HRA of employee in %age : ");
hra = (bs * (Convert.ToDouble(Console.ReadLine()))) / 100;
Console.WriteLine("DA of employee in %age");
da = (bs * (Convert.ToDouble(Console.ReadLine()))) / 100;
Console.WriteLine("His pf in %age ");
pf = (bs * (Convert.ToDouble(Console.ReadLine()))) / 100;
gs = bs + (hra + da) - pf;
Console.WriteLine("His hra is : " + hra);
Console.WriteLine("His da is : " + da);
Console.WriteLine("His pf is : " + pf);
Console.WriteLine("His gross salary is : " + gs);
Console.ReadKey();
}
}
class salary
{
public static void Main(string[] args)
{
abc a = new abc();
a.sal();
}
}
Output:
No comments :
Post a Comment