8. Factorial Division - C-Sharp - не си откривам грешката
30/100
Пробвах със long и double - няма промяна..
Read two integer numbers. Calculate factorial of each number. Divide the first result by the second and print the division formatted to the second decimal point.
using System;
namespace _8._Factorial_Division
{
class Program
{
static void Main(string[] args)
{
long fact = long.Parse(Console.ReadLine());
long devision = long.Parse(Console.ReadLine());
long sum = fact;
for (long i = fact-1; i >= 1; i--)
{
sum = sum * i;
}
Console.WriteLine($"{sum / devision:f2}");
}
}
}