Update calc.cpp

Updated using branch. Files merged.