Pages

Saturday, 10 January 2015

C Program To Find The Result of X/1 + X^2 / 2^2 + X^3 / 3^3+.....X^N / N^N

/* C Program To Find The Result of X/1 + X^2 / 2^2 + X^3 / 3^3....X^N / N^N */

For any query regarding c/c++ feel free to contact me on khimanichirag@gmail.com or comment below. I try my best to solve it.

 #include<stdio.h>  
 #include<conio.h>  
 void main()  
 {  
   int i=0,sum=0,x,y,n;  
   clrscr();  
   printf("Enter the value of X: ");  
   scanf("%d",&x);  
    printf("Enter the value of n: ");  
   scanf("%d",&n);  
   for(i=1;i<=n;i++)  
   {  
       sum=sum+pow(x,i)/pow(i,i);  
   }  
   printf("The sum of given series is: %d",sum);  
   getch();  
 }  

No comments:

Post a Comment