write a c program to calculate the income tax of the
employees in an organization where the conditions are given as.
(I.T. = 0 if income <100000
I.T = 10% if income _< 200000
it = 20% if income >_ 200000)
Answer Posted / akshit mahajan
#include <stdio.h>
int main()
{
// declaring variables
float income;
printf("Enter your income
");
scanf("%f", &income);
float tax_for_1_lac_and_above = (income)*0.10; // no addition beause no tax is applicable for less than 1lac so no previous summation
float tax_for_2_lac_and_above = (income - 200000) * 0.20 + 10000; //+10000(10k) because 10% of 100000(1lac)(previous summation)
if (income >= 100000)
{
printf("Your tax is 10%% and the tax will be %0.2f", tax_for_1_lac_and_above);
}
else if (income >= 200000)
{
printf("Your tax is 20%% and the tax will be %0.2f", tax_for_2_lac_and_above);
}
else if (income < 100000)
{
printf("No tax");
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is hashing in c?
How can I open a file so that other programs can update it at the same time?
What is the ANSI C Standard?
What is the auto keyword good for?
What is c value paradox explain?
What is the use of static variable in c?
Is calloc better than malloc?
Why is structure important for a child?
Why main is not a keyword in c?
What is openmp in c?
Why & is used in c?
what is event driven software and what is procedural driven software?
What is difference between class and structure?
Explain how can I read and write comma-delimited text?
Define circular linked list.