Arithmetic Progression C Program

By | May 24, 2016

C Program To Calculate Arithmetic Progression

Let’s understand the arithmetic progression series and calculate arithmetic progression in C programming language.

What is Arithmetic Progression?

An arithmetic sequence or arithmetic progression is a series of numbers arranged in a way that the difference between any two consecutive terms is constant.

In an arithmetic progression series, every consecutive element has a Constant difference between any two terms from the series. This means that the preceding term and the following terms will have the same difference.

In other words, an arithmetic progression is a series in which every next term after the first term is computed by adding the common difference (entered by the user) and preceding term.

Let’s assume that the first term is A and the common difference is D. Therefore, the terms in an arithmetic series will be as follows:

A, A + 1D, A +2D, A+ 3D

The Nth Term will be A + (N – 1)*D

Example For Arithmetic Series

1 5 9 13 17 21 25

Arithmetic Sequence Formula

AN = A1 + (N – 1)D

Note: This C program for arithmetic progression is compiled with GNU GCC compiler on Linux Ubuntu operating system. However, it is compatible with all other operating systems.

Method 1: C Program To Calculate Arithmetic Sequence using For Loop

Method 2: C Program To Print Arithmetic Progression using While Loop

Output

C Program To Calculate Arithmetic Progression using While and For Loop

Let’s discuss more on how to calculate arithmetic progression in C programming in the comment section below if you have any compilation errors and any doubts about the same. For more information on arithmetic sequences, check Wikipedia.

Recommended Programs
Replace a Character in Strings in C Programming
C Program To Find Distance Between Two Points
C Program To Find Special Number
C Program To Find Narcissistic Number
C Program To Check if Character is Alphabet or Digit
100+ C Programs For Programming Interviews

4 thoughts on “Arithmetic Progression C Program

  1. Leena Jaiswal

    Can we make up a program to find arithmetic progression in using Function? It will help me to modularize the program.

    Reply
    1. Tushar Soni Post author

      Yes! This C Program for Arithmetic progression can be developed using functions. You just need to copy the data within the for loop inside a separate user defined function

      Reply
  2. Ramees Raja

    Perfect Explanation to Print Arithmetic Progression in C Programming. Thanks.

    Reply
  3. Mayank Rathor

    Nice compilation of both the methods. Its simpler to generate arithmetic progression now!

    Reply

Let's Discuss