We already know how to get the factorial of a number in other languages. Let’s see how this is done in PHP using both recursive and non-recursive ways.
Example...

Share

The gmp_fact() is a built-in function in PHP which is used to calculate the factorial of a GMP number (GNU Multiple Precision : For large numbers).
Syntax:
gmp_fact (...

Share

Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements.
In declare...

Share

Problem – Write an assembly language program for calculating the factorial of a number using 8085 microprocessor.
Example –
Input : 04H
Output : 18H
as...

Share

Prerequisite – 8085 program to find the factorial of a number
Problem – Write an assembly language program for calculating the factorial of a number usi...

Share

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros.
Examples:
Input : n = 1
Output : 5 6 7 8 9
Explanation: Here, 5...

Share

Given the upper limit limit, print factorials of all Fibonacci Numbers smaller than limit.
Examples :
Input : limit = 20
Output : 1 1 1 2 6 120 40320 6227020800
Expla...

Share

Given an integer n, write a function that returns count of trailing zeroes in n!.
Examples :
Input: n = 5
Output: 1
Factorial of 5 is 120 which has one trailing 0.
...

Share

Given a number n, count total number of divisors of n!.
Examples:
Input : n = 4
Output: 24
4! is 24. Divisors of 24 are 1, 2, 3, 4, 6,
8, 12 and 24.
Input : n = 5
Ou...

Share

Given a number n, we need to calculate the sum of divisors of factorial of the number.
Examples:
Input : 4
Output : 60
Factorial of 4 is 24. Divisors of 24 are
1 2 3 ...

Share