Advanced Functions
Exercises
- Calculate simple interest using a function.
- Define a function that adds two numbers.
- Demonstrate the difference between a global variable and a static local variable.
- Write a function that converts a string argument from lowercase to uppercase.
- Calculate
nCr = n! / (r! * (n-r)!) using user-defined functions.
- Write a function that accepts two numbers and returns their GCD.
Click here for explanation and solution.