Appendix E. I’m mixed up; make me improper

In this appendix, you learn how to build an app that can convert mixed numbers to improper fractions, and vice versa.

What does this app do?

Start with a fraction or a proper fraction, in the form shown in figure E.1.

Figure E.1. A proper fraction

Here, 2 and 5 are two integers separated by a horizontal line. The integer part above the line is called a numerator, and the bottom part is called a denominator. If the numerator is less than the denominator, the fraction is called a proper ...

Get Hello Swift! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.