Page 1 of 1

Part I: The program will prompt the user to enter the three inputs, a1, the first term of the sequence, d, the differenc

Posted: Tue Jul 12, 2022 8:11 am
by answerhappygod
Part I The Program Will Prompt The User To Enter The Three Inputs A1 The First Term Of The Sequence D The Differenc 1
Part I The Program Will Prompt The User To Enter The Three Inputs A1 The First Term Of The Sequence D The Differenc 1 (94.84 KiB) Viewed 41 times
Part I: The program will prompt the user to enter the three inputs, a1, the first term of the sequence, d, the difference between the terms and n, the number of terms of the sequence. Any integer values are accepted: positive, negative or zero. Enter all inputs at the same time as in the previous lab. Enter the inputs in the correct order or the sequence will be incorrect. (60 Points) Enter al, d and n: [...] [...] [….] On a separate line output the values of the sequence on the same line each separated by a comma and a single blank space. Make sure that there is no comma after the last sequence term, which is a common mistake. The sequence is: [...], [...], Example: If the input is: (a1, d, n) 247 the output should be: 2, 6, 10, 14, 18, 22, 26 Part II: Update the code from part I to find the sequence sum. Use fixed <<setprecision (2); to round the sum to two decimal places. This only needs to be done once in the program. Output the sum with the following message on a separate line: (30 Points) S (n) = [...] S (even) [...] Part III: Update the code from part II to find the sum of the even numbers of the sequence. Output the even sum with the following message on a separate line: (10 Points) [. . . ] ct t