C Program to Find Sum of Arithmetic Progression Series

In this tutorial you will learn about the C Program to Find Sum of Arithmetic Progression Series and its application with practical example.

C Program to Find Sum of Arithmetic Progression Series

In this tutorial, we will learn to create a C program that will Find Sum of Arithmetic Progression Series using C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • While loop in C Programming.
  • Functions in C Programming.

What is Arithmetic Progression?

The arithmetic progression is a series in mathematics that starts from a point and the second term is having a common difference, and this series continues till the endpoint with the common difference.

Programs to Find Sum of Arithmetic Progression Series:-

In this program, First, we take the first term of the arithmetic progression. Then we will take the total number of terms in A.P. At last we will take the common difference from the user. Now we will generate the arithmetic progression using the for loop and the mathematical expressions. Then will print the sum of the arithmetic progression.

Program Code:-

 

Output:-

In the above program, we have first initialized the required variable

 

  • first_term = it will hold the integer value.
  • no = it will hold the integer value.
  • dis = it will hold the integer value.
  • tn = it will hold the integer value.
  • i = it will hold the integer value to control the array.

Taking the first term, common distance, and the number of terms from the user.

Generating the A.P. using the loops and calculating the sum.

 

Program Code for Printing the sum of series.

In this tutorial we have learn about the C Program to Find Sum of Arithmetic Progression Series and its application with practical example. I hope you will like this tutorial.