30
35 factorial = 1.0333148 × 10^40.... THAT IS A REALLY BIG NUMBER. Sterling came up with a good way to approximate it.
The number 10 can be the product of 2 and 5, 1 and 10. This means that 10 has 4 factors. :]
Four
10! = 3,628,800
3,628,800
To calculate the number of zeros in a factorial number, we need to determine the number of factors of 5 in the factorial. In this case, we are looking at 10 to the power of 10 factorial. The number of factors of 5 in 10! is 2 (from 5 and 10). Therefore, the number of zeros in 10 to the power of 10 factorial would be 2.
#include <iostream> using namespace std; int main() { int i, number=0, factorial=1; // User input must be an integer number between 1 and 10 while(number<1 number>10) { cout << "Enter integer number (1-10) = "; cin >> number; } // Calculate the factorial with a FOR loop for(i=1; i<=number; i++) { factorial = factorial*i; } // Output result cout << "Factorial = " << factorial << endl;
Four factors.
Suppose you're talking about N factorial. For an example, we'll let N be 20.For each prime number p, repeatedly divide N by p, discarding the remainder. Add up the answers.20/2 = 10, 10/2 = 5, 5/2 = 2, 2/2 = 1. 10+5+2+1 = 18.20/3 = 6, 6/3 = 2. 6+2 = 8.20/5 = 420/7 = 220/11 = 120/13 = 120/17 = 120/19 = 1Now add 1 to each of these results: 19,9,5,3,2,2,2,2.Now multiply these numbers. 19x9x5x3x2x2x2x2 = 41040.This is how many factors the factorial has. 20! has 41040 factors. (This includes both 1 and the factorial itself. Subtract 1 if you're only counting the proper factors.)The proof is left as an exercise for the reader.
35 factorial = 1.0333148 × 10^40.... THAT IS A REALLY BIG NUMBER. Sterling came up with a good way to approximate it.
The number 10 can be the product of 2 and 5, 1 and 10. This means that 10 has 4 factors. :]
Four
10! = 3,628,800
There are 10 letters is the word JOURNALISM. Since they are all different, the number of ways you can arrange them is simply the number of permutations of 10 things taken 10 at a time, or 10 factorial, or 3,628,800.
10! and 6! means factorial of 10, and factorial of 6, respectively. You can calculate that on most scientific calculators - or you can multiply all numbers from 1 to 6 for the factorial of 6, and all numbers from 1 to 10 for the factorial of 10.
An example in Java, to compute 10!: int factorial = 1; for(int i = 1; i < 11; i++) { factorial *= i; }
3,628,800