Update calc.cpp

Updated using branch.