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


Please Help Members By Posting Answers For Below Questions

Explain about C function prototype?

611


How are portions of a program disabled in demo versions?

751


What does 1f stand for?

614


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2334


How the c program is executed?

632






How can I recover the file name given an open stream?

556


Which is the memory area not included in C program? give the reason

1508


What is sorting in c plus plus?

565


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

656


What is meant by inheritance?

634


What is void main ()?

613


What is the general form of a C program?

598


Why is sizeof () an operator and not a function?

589


given post order,in order construct the corresponding binary tree

2323


Under what circumstances does a name clash occur?

692