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 && income>=100000)
tax = 10;

if (income>=200000)
tax = 20;

i_t = income*tax/100;
printf ("
Income Tax = %lf",i_t);
}

Is This Answer Correct ?    27 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between far and near in c?

603


How are variables declared in c?

599


How can I invoke another program or command and trap its output?

618


What is double pointer?

560


Write a program for finding factorial of a number.

635






main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

636


Is r written in c?

724


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

648


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

1706


Why is main function so important?

617


What are the characteristics of arrays in c?

616


Which is better malloc or calloc?

653


Explain what is dynamic data structure?

647


Is flag a keyword in c?

682


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

22234