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
Explain about C function prototype?
How are portions of a program disabled in demo versions?
What does 1f stand for?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
How the c program is executed?
How can I recover the file name given an open stream?
Which is the memory area not included in C program? give the reason
What is sorting in c plus plus?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What is meant by inheritance?
What is void main ()?
What is the general form of a C program?
Why is sizeof () an operator and not a function?
given post order,in order construct the corresponding binary tree
Under what circumstances does a name clash occur?