This is an old revision of the document!
This program will focus on a simple mental math trick: calculating the square of a multiple of 5.
This trick works with any multiple of 5 up to three digits (5 to 995), and can be done without much difficult math or a calculator.
Let's take an example number: 105. To calculate the square of 105, we can split the number into two parts, then perform a set of calculations on each part, in order to get our answer.
The two parts we want to split our number into are as follows:
Calculating the back portion is easy, we just need to multiply 5 by itself to get its square:
5 * 5 = 25
To calculate the front portion, we take our number (10), add one to it, and multiply these two values together to get the front portion of the answer:
10 * (10 + 1) = ?
10 * 11 = ?
10 * 11 = 110
Finally, we bring the two portions back together to get our answer:
110 25
11025
105 * 105 = 11025
In the project files that you grabbed, there is a reference program that you can run to check the output of the program you will be writing, along with the format of the output.