Topic: Adding elements in a array [IMG]

Somebody gave me this problem to solve some time ago:
1.Generate an array of 6 numbers(X) (max. 2 digits each)
2.Add each following numbers(X) to each other and store the individual scores(Y) in a separate array
3.Input a number via keyboard, if matches one of the numbers from array Y display msg, if not restart program.
Since I`m a total noob, trying my hardest to learn programming, this is what I know so far:
1. initilize empty array [x] & [y]
2. 6.times.map{ Random.rand(1..99) }
3. add numbers using each do?
4. store in array [y]
5. compare via input to == array [y]
6. if any instance matches display msg else restart
I would be really grateful for any guidance or help with this problem.
Last edited by Big_Bird (2011-06-24 15:23:33)