The idea of using machines to solve mathematical problems can be traced at least as far as the early 17th century. Mathematicians who designed and implemented calculators that were capable of addition, subtraction, multiplication, and division included Wilhelm Schickhard, Blaise Pascal (Pascal's contribution to computing was recognized by computer scientist Nicklaus Wirth, who in 1972 named his new computer language Pascal (and insisted that it be spelled Pascal, not PASCAL)) and Gottfried Leibnitz.
The first multi-purpose, i.e. programmable, computing device was probably Charles Babbage's Difference Engine, which was begun in 1823 but never completed. A more ambitious machine was the Analytical Engine. It was designed in 1842, but unfortunately it also was only partially completed by Babbage. Babbage was truly a man ahead of his time: many historians think the major reason he was unable to complete these projects was the fact that the technology of the day was not reliable enough. In spite of never building a complete working machine, Babbage and his colleagues, most notably Ada (Another pioneer with a programming language named after her. Naming languages after mathematicians is somewhat of a tradition in computer science. Other such languages include Russel, Euclid, Turning, and Goedel.) Countess of Lovelace, recognized several important programming techniques, including conditional branches, iterative loops and index variables.