Locker Code

A man forgot the secret code to open his locker. But he remembers the following clues:

Fifth number plus the third number equals fourteen.
First number is one less than twice the second number.
Fourth number is one more than the second number.
Second number plus the third number equals ten.
Sum of all five numbers is 30.

Can you find out the secret code to help him out?

Answer

The secret code is 7,4,6,5,8.

Let the numbers = a, b, c, d, e

Based on 1st clue:
e + c = 14

Based on 2nd clue:
a = 2b – 1

Based on 3rd clue:
d = b + 1

Based on 4th clue:
b + c = 10

Based on 5th clue:
a + b + c + d + e = 30

All numbers can be represented by b except for e so we need to rewrite equation 1. Substitute c = 10 - b from equation 4 into equation 1.

e + (10 – b) = 14
e = b + 4

Substitute a,c,d,e in equation 5

(2b – 1) + b + (10 – b) + (b + 1) + (b + 4) = 30

Solving for b gives 4. Use the other equations to find the values of a,c,d and e.