Monday, July 18, 2011

Write a c program to find out the sum of G.P series




Sum
of GP series in c programming language




#include

#include



int main(){



float a,r,i,tn;

int n;

float sum=0;



printf("Enter
the first number of the G.P. series: ");

scanf("%f",&a);



printf("Enter
the total numbers in the G.P. series: ");

scanf("%d",&n);



printf("Enter
the common ratio of G.P. series: ");

scanf("%f",&r);

No comments:

Post a Comment