Today I got my program to fully work with squaring numbers with 5 as the last digit. I had it working yesterday, in a different manner, but it stopped working. So I took a look at it and nearly rewrote it. I made it so when a number is typed by the user the program subtracts the 5 from the number, divides it by 10, then adds 1 to the remainder and multiplies it by the remainder before it had the 1 added to it.
This gave me a lot of trouble but it made it so now I understand more how things work in the code world.
With the method used in this program it only works with 2 digit numbers. There is a way to adapt the method to work on 3 and 4 digit numbers but it's more work than it's worth.
This program really stumped me for a bit.