While squaring a non-zero number John added the number to itself instead of multiplying with itself. John still got the correct answer. Find the number John started with.
Let a be the number
a^2 = a + a
a^2 = 2a
a^2 - 2a = 0
a( a - 2) = 0
Since a is non-zero, then a - 2 = 0 ⇒ a = 2
2^2 = 2 + 2
4 = 4