C Program to Find Sum of Geometric Progression Series

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

C Program to Find Sum of Geometric Progression Series

In this tutorial, we will learn to create a C program that will Find the Sum of the Geometric 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 Geometric Progression?

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

It means if the first term is 1 and then the ratio of 5 then the next term will be 5 then the next term will be 5*5.

Programs to Find Sum of Geometric Progression Series:-

In this program, First, we take the first term of the Geometric progression. Then we will take the total number of terms in G.P. At last we will take the common ratio from the user. Now we will generate the Geometric progression using the for loop and the mathematical expressions. Then will print the sum of the Geometric 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.
  • rt= it will hold the integer value.
  • tn = it will hold the float value.
  • i = it will hold the integer value to control the array.

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

Generating the geometric progression 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 Geometric Progression Series and its application with practical example. I hope you will like this tutorial.