C++Tutorial for Beginners 26 - Return Values: Getting Data From Subroutines

Often we want to get a single value from a subroutine. In mathematics, a "function" is a routine that accepts one or more numbers, performs some kind of processing and returns a number as the result; C++ functions allow for more flexibility than this, but it's still common to want your function to produce a value as a result of its operations.