Update calculator.cpp

i have updated my file and added square function