Solve problem 8
Refactor and optimize mathematical multiplication

Now use simple x * x multiplication instead of the math library's pow
for square calculation.
Solve problem 9