Why was the Computer Invented?

Addition and subtraction or simple mathematics was the original purpose for why the computer was invented. As the years went on more uses were found and the computer was expanded upon. One example is cracking the enigma code used by the German U-Boats.