Update calc.cpp

included add function