Nothing Special   »   [go: up one dir, main page]

Program: Using Using Using Using Namespace Class Static Void String Float Float Int

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace tax
{
class Program
{
static void Main(string[] args)
{
float gp, bs, da, hra, eid, pf, pt, ded, ns, daamt, annual;
float aic, tax;
Console.WriteLine("Enter the employee id:");
eid = int.Parse(Console.ReadLine());

Console.WriteLine("Enter the employee basic pay:");


bs = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the employee da:");
da = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the HRA:");
hra = int.Parse(Console.ReadLine());
daamt = bs * da / 100;
gp = bs + daamt + hra + da;
Console.WriteLine("Enter the gross pay:" + gp);
Console.WriteLine("Enter the PF:");
pf = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the PT:");
pt = int.Parse(Console.ReadLine());
ded = pf + pt;
Console.WriteLine("Deduction:" + ded);
ns = gp - ded;
Console.WriteLine("Net salary:" + ns);
aic = ns * 12;
Console.WriteLine("Annual income:" + aic);
annual = aic - 250000;
if (annual <= 250000)
{
Console.WriteLine("no tax");
}

else if ((annual > 250000) && (annual < 350000))


{
tax = annual * 10 / 100;
Console.WriteLine("your tax amount:" + tax);
}
else if ((annual > 350000) && (annual < 450000))
{
tax = annual * 15 / 100;
Console.WriteLine("your tax amount is:" + tax);
}
else
{
tax = annual * 25 / 100;
Console.WriteLine("your tax amount is:" + tax);

}
Console.ReadKey();

You might also like