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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 39 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply