The document provides 12 prompts for writing C# programs to create various user-defined functions, including functions to: sum two numbers, count spaces in a string, calculate the sum of elements in an array, swap integer values, raise a number to a power, display a Fibonacci sequence, check if a number is prime, calculate the sum of digits in a number, find the factorial of a number recursively, and calculate a Fibonacci number of a specific term recursively.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
44 views
Function Exercises
The document provides 12 prompts for writing C# programs to create various user-defined functions, including functions to: sum two numbers, count spaces in a string, calculate the sum of elements in an array, swap integer values, raise a number to a power, display a Fibonacci sequence, check if a number is prime, calculate the sum of digits in a number, find the factorial of a number recursively, and calculate a Fibonacci number of a specific term recursively.