answersLogoWhite

0

exponential series

#include<stdio.h>

#include<conio.h>

#include<math.h>

void main()

{

int i,x,n;

float e=1,denominator=1;

clrscr();

printf("Enter the value of x,n\n");

scanf("%d,%d",&x,&n);

while(i<=n)

{

e+=(float)(pow(x,i)/denominator);

denominator*=i;

++i;

}

printf("answer is %f",e);

}

User Avatar

Wiki User

8y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: C program for exponential series
Write your answer...
Submit
Still have questions?
magnify glass
imp