Update calc.cpp

updated from other account!