Question: The factorial function is defined as: 0! = 1 n! = 1 2 3 ... (n-2) (n-1) n Write a C++ function that will return

The factorial function is defined as: 0! = 1 n! = 1 2 3 ... (n-2) (n-1) n Write a C++ function that will return n! The input to the function will be an integer n and the function will return n! in single precision. Repeat (a) but this time the function will return n! in double precision. Use these function in a program that display 0 to 5 factorial twice: once using the single precision function and once using the double precision function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
