Update calc.cpp

added square method