Update calc.cpp

added a square() method