A factorial of a number is the product of all positive integers less than or equal to that number.
For example, the factorial of 5 is: 5 × 4 × 3 × 2 × 1 = 120.
In Java, this can be achieved using a for loop, where we multiply the number iteratively.
Below is the Java program to compute the factorial of 5:
This program initializes a variable factorial to 1 and multiplies it by each number from 1 to 5 using a for loop.
Finally, the result is printed on the screen.
| Particulars | 31-03-2024 (₹) | 31-03-2023 (₹) |
|---|---|---|
| Equity Share Capital | 12,00,000 | 8,00,000 |
| 11% Debentures | 3,00,000 | 4,00,000 |
| Securities Premium | 1,40,000 | 1,00,000 |