Monday, February 20, 2012

Recollection: First program

So what was the first thing you programmed?

This came up in discussion and it was quite interesting recalling the first real computer program I created.  In Math we often played this simple game.  Draw 5 numbers.  Use multiplication, division, subtraction, and addition on the first 4 to come up with the  5th number.  The details are foggy but I believe we used operator precedence.

For example, given 5, 9, 2, and 3, create an equation that equals 6.

(9 / 3) - 2 + 5 = 6.

Find an equation for 13, 11, 17, 14 and 15.  Ok this one I'm not going to solve.  What frustrated me at the time was some combinations we could not solve.  Was this because we missed the answer?  Or was it unsolvable?

This led me to write my first program.

No comments:

Post a Comment