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);
}
Chat with our AI personalities
write a program to print the series 1/12+1/22+.........+1/n2 ?
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
#include<stdio.h> #include<conio.h> void main() { }
c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.
how to create a c program for left factoring.