Print factorial of 24.
| Test | Status | Details |
|---|
Ready — edit the code above and click Run or Submit.
using System;
class Program
{
static void Main()
{
int n = 24;
long f = 1;
for (int i = 2; i <= n; i++) f *= i;
Console.WriteLine(f);
}
}
Try solving on your own first, then reveal the official answer.
Use long for larger n.