The first step to understand the workings of Income Tax in India is to be aware of the taxation slabs released each financial year by the Indian Government. The taxation slabs for the financial year 2014-15 for General tax payers and Women: –
Slab
|
Income Slab (Rs.)
|
Income Tax Rate
|
0
|
0 to 2,50,000
|
NIL
|
I
|
2,50,001-5,00,000
|
10%
|
II
|
5,00,001-10,00,000
|
20%
|
III
|
10,00,001 and above
|
30%
|
If you fall in Slab I, tax will be deducted on the amount that exceeds Rs. 2,50,001/- . Similarly, tax for Slab II and Slab III will be calculated for the amount that exceeds Rs. 5,00,001/- and Rs. 10,00,001/- respectively. The same principle also applies to the tax slabs for senior citizens (Aged 60 years but less than 80 years):-
Slab
|
Income Slab (Rs.)
|
Income Tax Rate
|
0
|
0 to 3,00,000
|
NIL
|
I
|
3,00,001 to 5,00,000
|
10%
|
II
|
5,00,001 to 10,00,000
|
20%
|
III
|
10,00,000 and above
|
30%
|
India Income tax slabs 2014-2015 for very senior citizens (Aged 80 and above):-
Slab
|
Income Slab (Rs.)
|
Income Tax Rate
|
0
|
0 to 5,00,000
|
NIL
|
I
|
5,00,001 to 10,00,000
|
20%
|
II
|
10,00,000 and above
|
30%
|
Now, find out the variables needed for this program calculating INCOME TAX.
Here we find out two variables for this program. First is INCOME of the person which is to be entered by the user. Second is the TAX to be calculated by the program to be payable by the person.
we have INCOME ,TAX. (i.e. Two Variables)
Now decide the data type for the variables INCOME ,TAX.
Whenever we are using anything related to money, we should use float or double .float can hold smaller values compared to double. Hence we will omit float. Select double as our data type.
Whenever we are using anything related to money, we should use float or double .float can hold smaller values compared to double. Hence we will omit float. Select double as our data type.
double INCOME,TAX;
Variables and data type selection done.
Interactive means the program will not have any hard coded values assigned to variables but user has to provide them.
To get values from the user screen we have a function called scanf() which will help us to scan values entered by the user by keyboard and visible on the screen.
We cannot expect that user should enter values in the sequence blindly without knowing what to enter. For that purpose we should guide the user to enter expected values by displaying message.
We cannot expect that user should enter values in the sequence blindly without knowing what to enter. For that purpose we should guide the user to enter expected values by displaying message.
(E.g. ENTER THE INCOME OF A PERSON : ) than scan the value entered for Income in INCOME and so on.
printf("THE INCOME TAX PAYABLE OF A PERSON IS : %.2lf",TAX);
Here we are using %.2lf instead of %f so that the Amount is printed to Two Decimal Digits.
Note: – Remember whenever you are scanning or printing the values of double be careful to write %lf instead of just %f. Because %lf is used for double data type and %f is used for float data type.
0 comments: