Update calc.cpp

added a square() function