Subject: PHP

For Loop to Calculate Factorial

Create a variable $num = 5

Use a for loop to calculate the factorial of $num (i.e., 5! = 5 * 4 * 3 * 2 * 1) and display the result.

Select file or drag and drop

PNG, JPG, SVG

Preview