Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program to calculate the factorial by means of a function. Note: The res

ID: 3617511 • Letter: W

Question

 Write a program to calculate the factorial by means of a function.
Note: The result will not be accurate for relatively larger numbers with
the built-in C++ data types.

Expected Output:
(i)
Enter a number for factorial computation and press ENTER: 5
5! (by Factorial Function) is 120

(ii)
Enter a number for factorial computation and press ENTER: 23
23! (by Factorial Function) is 25852016738884978000000

(iii)
Enter a number for factorial computation and press ENTER: 38
38! (by Factorial Function) is 523022617466601040000000000000000000000000000

Explanation / Answer

#include long getFactorial(intnum) {     int fact=1;     for(int i=2;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote