-->

Write a program to read annual salary of an employee and decide tax withheld as follows.

//Write a program to read annual salary of an employee and decide tax withheld as follos.
//         salary                                          tax
//            <=100000                                0%
//           upto 150000                              15%
//          above 150000                             25%
#include<stdio.h>
#include<conio.h>
void main()
{
float annual_salary;
float total_tax;
printf("enter total annual salary \n");
scanf("%f",&total_sales);
if(annual_salary<=100000)
    {
         total_tax=0; 
         printf("total tax to be paid=Rs. 0\n");
    }
elseif(annual_salary>100000 &&annual_salary<=150000)
    {
         total_tax=annual_salary*0.15
         printf("total tax to be paid=Rs. %f\n",total_tax);
    }
elseif(annual_salary>150000)
    {
          total_tax=annual_salary*0.25
          printf("total tax to be paid=Rs. %f\n",total_tax);
    } 
printf("thank you!!!!\n");
getch();
}

No comments:

Post a Comment