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 / marvin
#include <studio.h>
main()
{
double income, i_t;
int tax;
printf ("
Enter income: ");
scanf ("%lf", &income);
if (income<100000)
tax = 0;
if (income<=200000)
tax = 10;
if (income>200000)
tax = 20;
i_t = income*tax/100;
printf ("
Income Tax = %lf",i_t);
}
| Is This Answer Correct ? | 6 Yes | 11 No |
Post New Answer View All Answers
What is a loop?
Differentiate between a for loop and a while loop? What are it uses?
What is the use of getchar() function?
Is r written in c?
What is the function of multilevel pointer in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
write a proram to reverse the string using switch case?
How can I do graphics in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What is the maximum no. of arguments that can be given in a command line in C.?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is storage class?
Why is c called a mid-level programming language?
What are local static variables? How can you use them?
How do you list files in a directory?