I am learning C++ with [C++ Primer], an example of \'calculating the sum of input values\' is a bellow