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


Please Help Members By Posting Answers For Below Questions

What is #line?

615


Are comments included during the compilation stage and placed in the EXE file as well?

674


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

661


What are the 5 data types?

607


how to construct a simulator keeping the logical boolean gates in c

1732






What is malloc and calloc?

578


What does d mean?

589


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2728


what is the format specifier for printing a pointer value?

617


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1427


what is the difference between 123 and 0123 in c?

728


What is the deal on sprintf_s return value?

647


What is && in c programming?

684


What are directives in c?

550


How can I remove the leading spaces from a string?

638