Tuesday, November 4, 2014

Return Statement

The return statement is used to return a value to the caller of the function. It returns a value that can be used outside the function. See example below.

Here is a similar program where the area value is not returned. Thus I have embedded the print statement within the function get a similar output.


No comments:

Post a Comment