Skip to main content
Logo image

Section 19.4 Intro to the Fraction Calculator

Today, we will all be jointly working on a fraction calculator, that is a calculator that can solve simple fraction problems such as adding, subtracting, multiplying and dividing fractions.
When tackling a bigger programming challenge such as this it’s important to plan ahead!
Here is a first (rather coarse) breakdown of our Fraction Calculator:
  1. Get a fraction problem from the user
  2. Compute the result
  3. Display the result
  4. Continue (y/n)?

Activity 19.1.

How can we further break down "Get a fraction problem from the user"?

Activity 19.2.

How can we further break down "Get a fraction"?