Update calc.cpp

Added a suqare() method