//this is a program to calculate the income tax of employee
#include<stdio.h>
#include<conio.h>
void main()
{
char gen;
long int income;
float tax;
printf("\n\nEnter Your Gender(m/f): ");
scanf("%c",&gen);
printf("\n\nEnter Your Salary: ");
scanf("%ld",&income);
if(gen=='m')
{
if(income<=100000)
{
printf("\n\nNo Income Tax");
}
else
{
tax=(income-100000)*(10.0/100);
printf("\n\nIncome Tax=%f",tax);
}
}
else if(gen=='f')
{
if(income<=135000)
{
printf("\n\nNo Income Tax");
}
else
{
tax=(income-135000)*(10.0/100);
printf("\n\nIncome Tax=%f",tax);
}
}
else
{
printf("\n\nWrong Choice");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
char gen;
long int income;
float tax;
printf("\n\nEnter Your Gender(m/f): ");
scanf("%c",&gen);
printf("\n\nEnter Your Salary: ");
scanf("%ld",&income);
if(gen=='m')
{
if(income<=100000)
{
printf("\n\nNo Income Tax");
}
else
{
tax=(income-100000)*(10.0/100);
printf("\n\nIncome Tax=%f",tax);
}
}
else if(gen=='f')
{
if(income<=135000)
{
printf("\n\nNo Income Tax");
}
else
{
tax=(income-135000)*(10.0/100);
printf("\n\nIncome Tax=%f",tax);
}
}
else
{
printf("\n\nWrong Choice");
}
getch();
}