Write a program that will perform one of the following operations: 1. Print the Fibonacci series from 0 to N 2. Print the Prime numbers from 0 to N 3. Print the Factorial of the numbers from 0 to N Include at least the following functions in your program: • menu: a function to display the operations listed above o Use a switch-statement to process the user’s choice • fibonacci: a function that will print the Fibonacci series from 0 to N o Sample Input: Suppose N = 5 o Sample Output: 0 1 1 2 3 5 • primeNumbers: a function that will print the prime numbers from 0 to N o Sample Input: Suppose N = 5 o Sample Output: 2 3 5 • factorial: a function that will print the factorials of the numbers from 0 to N o Sample Input: Suppose N = 5 o Sample Output: 0! 1! 2! 3! 4! 5! = 1 1 2 6 24 120 Include a loop that will allow the user to repeat the whole program if he wants to. PLEASE add "//" every code wirtten to explain its use in the program. thank you! do the following conditions set and DO IT IN C++
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Write a program that will perform one of the following operations:
1. Print the Fibonacci series from 0 to N
2. Print the Prime numbers from 0 to N
3. Print the Factorial of the numbers from 0 to N
Include at least the following functions in your program:
• menu: a function to display the operations listed above
o Use a switch-statement to process the user’s choice
• fibonacci: a function that will print the Fibonacci series from 0 to N
o Sample Input: Suppose N = 5
o Sample Output: 0 1 1 2 3 5
• primeNumbers: a function that will print the prime numbers from 0 to N
o Sample Input: Suppose N = 5
o Sample Output: 2 3 5
• factorial: a function that will print the factorials of the numbers from 0 to N
o Sample Input: Suppose N = 5
o Sample Output: 0! 1! 2! 3! 4! 5! = 1 1 2 6 24 120
Include a loop that will allow the user to repeat the whole program if he wants to.
PLEASE add "//" every code wirtten to explain its use in the program. thank you! do the following conditions set and DO IT IN C++
Step by step
Solved in 7 steps with 5 images