Since totalamount is less than 80 it has to be pair, the greataest ammount like this is of 78$, that is 39 pens.
Tim sells x pens for $2 each.
So, the total amount of money Tim got out of this sale is 2x.
By the condition of the problem,
We have to find the maximum value of x for which this inequality holds good.
To solve the problem, let us first assume that 2x = 80,
or, x = 80/2 = 40.
Returning back to the original inequality,
x < 40
The maximum value of x for which this inequality holds good, is 39.
Therefore, the greatest amount of pens that Tim could've have sold is 39.