C++ examples for Function:Function Creation

Click the following links for the tutorial for Function and Function Creation.

- Calculate compound interest using function
- Call your own function
- Our First Function
- A simple function call: declare a function, define it, and call it.
- Prime-Number Function
- Define two functions in addition to main
- Using function to simulate any number of dice rolls.
- Using two local variables with the same name as counting variables.
- Two different local variables with the same name.
- Second function has its own local variable.
- Pass three local variables to functions.
- Program with multiple local variables called i.
- Calculate the user's weight in a second function.
- Doubles the user's number with a function
- Calculates the average of three input values using function.
- Defines a function that computes net pay.
- Prints the ASCII character of the user's number. Prototype function.
- Create a function with multiple parameters.
- Create a function with no parameters
- Writing Your Own Functions with parameter
- Keeping your variables local in your function
- Create a function which doesn't return anything.
- Making Nested Function Calls
- Output variable in function
- Using Variables with Functions
- Create function that determines the area of a rectangle by multiplying its length by its width
- Creates several different scopes, each with their own local variables.
- Define local variable in function
- Using an inline function to calculate the volume
- Generating Fibonacci numbers using two functions.
- Calculating powers with your own function
- Demonstrate simple function
- Demonstrate function definition preceding function calls
- Demonstrate inline functions
- Create an inline function to convert Fahrenheit to Celsius
- Storage for automatic local variables is created automatically each time a function is called.