# code to calculate the income tax

Page 1 of 1

## 1 Replies - 6769 Views - Last Post: 26 April 2009 - 09:50 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=101726&amp;s=3a5308333d3f1b52e83949b19ddabd60&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 Kokila.N

Reputation: 0
• Posts: 2
• Joined: 26-April 09

# code to calculate the income tax

Posted 26 April 2009 - 09:45 AM

How to calculate the incometax to be paid when range is given? using if,for loops?
Is This A Good Question/Topic? 0

## Replies To: code to calculate the income tax

### #2 Martyr2

• Programming Theoretician

Reputation: 5178
• Posts: 13,898
• Joined: 18-April 07

## Re: code to calculate the income tax

Posted 26 April 2009 - 09:50 AM

It is site policy that you first provide a "best effort" attempt at solving the problem yourself. This means we like to see what kind of coding you have done to try and solve the problem before we can jump in and assist.

But as for an answer, income tax can be a complicated thing to figure out. With credits, deductions what you can claim and what you can't.

However, if you are looking at a straight tax rate given a scale based on a person's income, then it is just a matter of knowing the scale, knowing the income and making decision logic. I am not sure that would necessarily involve a for loop. More if-then logic or switch statements.

We won't know what you are trying to do until you post more information and some of the code you have been working on.

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }