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


Please Help Members By Posting Answers For Below Questions

When can you use a pointer with a function?

564


What are dangling pointers? How are dangling pointers different from memory leaks?

617


Can you please explain the difference between malloc() and calloc() function?

611


What is bin sh c?

576


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

2552






How do we open a binary file in Read/Write mode in C?

676


Do you know what are bitwise shift operators in c programming?

581


Differentiate between null and void pointers.

627


What are linker error?

612


What is n in c?

571


What is the size of array float a(10)?

651


List some of the static data structures in C?

759


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

1793


What is #include cctype?

576


What is the difference between exit() and _exit() function in c?

578