Question: c++ Programming Problem 2 - File Name: AP.cpp Note: Solve this problem using Do While loop statement. Description: Create a program that will print the

c++  c++ Programming Problem 2 - File Name: AP.cpp Note: Solve this
problem using Do While loop statement. Description: Create a program that will

Programming Problem 2 - File Name: AP.cpp Note: Solve this problem using Do While loop statement. Description: Create a program that will print the Arithmetic Progression (AP) series and sum till N Terms. Arithmetic series is a sequence of terms in which next term is obtained by adding common difference to previous term. Let, 1, be the n" term of AP, then (n+1) term can be calculated as (n+1)" =1, +D where D is the common difference (n+1) - 1, The formula to calculate 1 term t. = a + (n-1)d; where, a is first term of AP and d is the common difference. [0911-120): [Fundamentals of Programming] 5 Page Input Format: This program will accept 3 integer input. First the program will prompt a message that will ask the user to enter the number of terms in the AP series. Next, the program should prompt the user to enter the first term followed by the common difference separated by a space. Example Input: Enter the number of terms in AP Series 5 Enter the first term and common difference of AP Series 2 4 Output Format: The program should display the AP series in a single line separated by a space and the sum of all numbers in the series up to N terms. The output of this program should be displayed in different lines as shown on the example output below. Example Output: AP SERIES 2 6 10 14 18 Sum of the AP Series 150 Example Program Execution Enter the number of terms in AP series Enter first terms and common difference of AP series 2.4 AP SERIES 2 6 10 14 10 Sum of the AP series is: 50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!