Search & Find out

Thursday, November 26, 2009

Salary & Tax program

/* Gross Salary Program*/ 

#include "stdio.h"
#include "conio.h"

void main()
{
double bs, hra, da, gs, as,it;
clrscr();
printf("Enter your basic salary: ");
scanf("%lf",&bs);
da=((bs*40)/100);
hra=((bs*20)/100);
gs=da+hra+bs;
printf("\nyour dearness allowance is %lf ",da);
printf("\nyour hra is %lf  ",hra);
printf("\nyour gross salary is %lf  ",gs);
as=gs;
if(as>150000 && as<=300000)
{
printf("\n\n your income tax percent is 10%\n\n");
 it=((as*10)/100);
}
else if(as>300000 && as<=500000)
{
printf("\n your income tax percent iss 20% \n\n");
it=((as*20)/100);
}
else if(as>500000)
{
it=((as*30)/100);
printf("\n your incometax percent is 30% \n\n");
}
else
{
it=0;
printf("\n you donot have to pay income tax \n\n");
}
printf("\n Your income tax amt is %lf",it);

getch();

}



Download the executable (.exe)  file for this program..
download

0 comments:

Post a Comment

 

My Blog List

Term of Use