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 / johni
#include<stdio.h>
#include<conio.h>
void main()
{
float income;
char name;
int no;
float tax;
printf("Enter the name\n");
scanf("%s",name);
printf("Enter the number for more clarification\n");
scanf("%d",&n);
printf("Enter the income\n:);
scanf("%f",&income);
if(income<100000)
tax=0;
else if(income<200000)
tax=(income-200000)*0.1;
else
tax=20000+(income-200000)*0.2;
getch();
}
Is This Answer Correct ? | 56 Yes | 40 No |
Post New Answer View All Answers
What is variable declaration and definition in c?
What is difference between structure and union?
Can you subtract pointers from each other? Why would you?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
How does pointer work in c?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What are integer variable, floating-point variable and character variable?
How can I remove the leading spaces from a string?
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
What are the applications of c language?
What does main () mean in c?
Why ca not I do something like this?
Explain the concept and use of type void.
Why c language?
What is extern keyword in c?