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
What is the difference between far and near in c?
How are variables declared in c?
How can I invoke another program or command and trap its output?
What is double pointer?
Write a program for finding factorial of a number.
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
Is r written in c?
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
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Why is main function so important?
What are the characteristics of arrays in c?
Which is better malloc or calloc?
Explain what is dynamic data structure?
Is flag a keyword in c?
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!+....