C program to find the sum of the Arithmetic Progression (A.P.) series
belongs to collection: Sum of series programs/examples in C programming language
All Answers
total answers (1)
belongs to collection: Sum of series programs/examples in C programming language
total answers (1)
Arithmetic Progression (AP):
A series of numbers is called an arithmetic progression (AP) series if the difference between any two consecutive terms is always the same.
Example: 2 4 6 8 10 ...
In the below program, we will read the first term, the total number of terms, and common difference from the user and print A.P. series and its sum.
Program:
The source code to find the sum of the Arithmetic Progression (A.P.) series is given below. The given program is compiled and executed using GCC compile on UBUNTU 18.04 OS successfully.
Output:
Explanation:
Here, we read the first term, common difference, and the total number of terms from the user. Then we generated the A.P. series and find its total and printed them on the console screen.
need an explanation for this answer? contact us directly to get an explanation for this answer