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 does %c do in c?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Can you please explain the difference between strcpy() and memcpy() function?
What is an identifier?
What is anagram in c?
Why do we need functions in c?
What is structure in c explain with example?
How to declare pointer variables?
Is stack a keyword in c?
what is the height of tree if leaf node is at level 3. please explain
Explain what are multibyte characters?
What do you mean by Recursion Function?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Can we change the value of static variable in c?
Explain what is the difference between null and nul?