Update calc.cpp

This file contain main method in addition to 1 more method.