Update calc.cpp

Edited in the new branch