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...

Write a program to compute the following
1!+2!+...n!

Answer Posted / yamuna

/* A.Yamuna III BSC CS L.R.G. College , Tirupur*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,n;
int sum=1;
int total=0;
clrscr();
printf("Enter the number :");
scanf("%d",&n);
for(a=1;a<=n;a++)
{
for(int i=1;i<=a;i++)
{
sum=sum*i;
}
total=total+sum;
sum=1;
}
printf("The factorial is :%d",total);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is storage class?

1019


Differentiate between Macro and ordinary definition.

1277


What is call by value in c?

958


What are the valid places to have keyword “break”?

1043


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1337


Which is best linux os?

974


Is c is a middle level language?

1015


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1383


What is the g value paradox?

1107


When a c file is executed there are many files that are automatically opened what are they files?

1040


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

961


What is call by reference in functions?

1327


List the different types of c tokens?

1013


Why is c called c not d or e?

1052


What is structure in c explain with example?

1094