Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Describe for loop and write a c program to sum the series
X + x2/2! + x3 /3! + …….. up to fifteen terms.

Answer Posted / gouthami chintala

#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0;
int x,i,j,c=1;
printf("enter a value for a x);
scanf("%d",&x);
for(i=1;i<=15;i++)
{
for(j=i;j<=1;j--)
{
c=c*i;
}
sum=sum+(x/c);
}
printf("the value of x+x/2!+x/3!----- for the given x value
is");
printf("%d",sum);
}

Is This Answer Correct ?    24 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When we use void main and int main?

1133


What is far pointer in c?

1399


Is array a primitive data type in c?

1139


What are the preprocessor categories?

1119


What are data types in c language?

1111


which type of aspect you want from the student.

2209


How can you increase the allowable number of simultaneously open files?

1222


How can type-insensitive macros be created?

1224


What is an lvalue in c?

1190


How can I remove the leading spaces from a string?

1224


Do character constants represent numerical values?

1404


Why is it usually a bad idea to use gets()? Suggest a workaround.

1880


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1201


How do I use strcmp?

1141


What is difference between constant pointer and constant variable?

1410