[SOLVED] Need help solving a problem

I am working on code for a game and need a math solution. I was hoping some one here could help me out. I have 3 fields: level, task, and reward. Level and task should equal rewards. Below is a list of how the results should look. What I'm looking for is one equation that will work for all cases. The equation needs to be written in a format similar to this (((task * 50) - (level * 10)) + 10).

[html]Level Task Reward

1 1 50

2 1 40

3 1 30

4 1 20

5 1 10

2 2 100

3 2 80

4 2 60

5 2 40

6 2 20

3 3 150

4 3 120

5 3 90

6 3 60

7 3 30[/html]