Exercise: Build a Calculator

Let's go through what you have learned in this chapter.

We'll cover the following

Problem statement

You have the beginnings of a calculator program. It can add and subtract from the accumulator. You need to extend the program to support multiplication and division. Then, you need to extend the included program to multiply the accumulator by two and divide the accumulator by four.

Coding challenge

We encourage you to try solving it yourself before looking at the solution.

Your starting calculator code is as follows:

Get hands-on with 1400+ tech skills courses.