Question: need help here Toies Program 4 (20 points) (20 points) Jan, from the Accounting Department at the ACME Corporation, likes to see numbers in tables.
Toies Program 4 (20 points) (20 points) Jan, from the Accounting Department at the ACME Corporation, likes to see numbers in tables. She want to see factorials and sums of numbers together because it relaxes her. A factorial of a positive integer n, denoted by nl is the product of all positive integers less than or equal to : n! = = (n-1)(n-2) x (n-3) (1 - 4) (n - 5)(n-6) (n - 7) x (n-8)...X 4 X 3 X 2 X 1 for example: 7. = 7 X 6 X 5 X 4 X 3 X 2 X 1 = 5040 The sum of natural numbers is defined as a series in the form k = +ng + n + n + Ttg + n + 1; ++...+ng for example: k = 1+2+3 +4 +5 +6 + 7 = 28 Write a C++ program that will display a table similar to the following (assuming 1-6) 2 Number (11) Sum of Factorial (nb) 1 1 1 2 Number (a) Sum ofn Factorial (nl) 4 10 24 5 15 120 6 21 720 The program should ask for a number between 1 and 20 for the vil'se of n. The table should have 4 columns Format numbers using Enotation up to 6 decimal places. Validate your input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
