Showing posts with label WAP to find out TOTAL SALARY with (IF-ELSE). Show all posts
Showing posts with label WAP to find out TOTAL SALARY with (IF-ELSE). Show all posts

TOTAL SALARY

WAP to find out TOTAL SALARY with (IF-ELSE)

void main ()

{

long int sal,hra,ta,ts;

clrscr ();

printf ("Enter Salary: ");

scanf("%ld",&sal);

if (sal>=5000)

{

hra=sal*.10;

ta=sal*.07;

}

else

{

hra=sal*.08;

ta=sal*.05;

}

ts=sal+hra+ta;

printf ("\n\nTotal Salary is Rs.%ld", ts);

getch ();

}


Labels