Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

need help here image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago