Update calc.cpp

square fn is added