Update calc.cpp

added sub case