#include
#include
void main()
{
int fact(int n);
clrscr();
printf("%d",fact(5));
getch();
}
int fact(int n)
{
int fact=1;
while(n>=1)
{
fact=fact*n;
n--;
}
return fact;
}
Pseudo code+factorial
Basically, &array[i]; That is, the memory location for an array object with index i. Or, you can do: (array + i);
18 factorial is 6,402,373,705,728,000.
Divide the array in half and get the median of each half
(array.length - 1) will find the index of the last element in an array (or -1 if the array is empty).
Pseudo code+factorial
Kat
this is a code for calculating it recursivelly: float Factorial (float n) { if (n<=1) return 1.0; else return n* Factorial(n-1); }
If you have N things and want to find the number of combinations of R things at a time then the formula is [(Factorial N)] / [(Factorial R) x (Factorial {N-R})]
factorial
Basically, &array[i]; That is, the memory location for an array object with index i. Or, you can do: (array + i);
by using index position we can find the particular element in array.
The value of 9 factorial plus 6 factorial is 363,600
to find factorials you just multiply the factorial like this. for example 6! you would do 6x5x4x3x2. a little trick of mine is to multiply the previous factorial's answer by the factorial you are trying to make's number like this 6!=5! 5!=5x4x3x2 i hope this was helpful' Dayna,a 10 year old girl
It is 4060.
factorial of -1
i need a pic of cuson