• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
September 13, 2022 |450 Views
C Program to find Nth term of Arithmetic progression
  Share  1 Like
Description
Discussion

In this video, we will write a C Program to find the Nth term of Arithmetic progression. 

An arithmetic Progression is a sequence of a number such that the difference between any two successive numbers is the same. So the given first term (a), the common difference (d), and an integer N of the Arithmetic Progression series, the task is to find the Nth term of the series.
 
Examples:

Input : 
a = 2
d = 1
N = 5

Output :
The 5th term of the series is  6.

We know the Arithmetic Progression series is like = 2, 5, 8, 11, 14, and so on. This series 2 is the starting term series. Common difference = 5 – 2 = 3 (Difference common in the series).So we can write the series as :
t1 = a1
t2 = a1 + (2-1) * d
t3 = a1 + (3-1) * d
.
tN = a1 + (N-1) * d


To find the Nth term in the Arithmetic Progression series we use the simple formula: 

=>  TN = a1 + (N-1) * d

Approach:


Step 1: Get the value of a, d, and n from the user.
Step 2: Apply the formula TN = a1 + (N-1) * d to calculate the Nth term.
Step 3: Print the output.