Factorial Division
Здравейте, дава ми 30/100, ако може някой да ми помогне.
1.Factorial Division
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.
Examples
Input |
Output |
|
Input |
Output |
5 2 |
60.00 |
|
6 2 |
360.00 |
using System;
namespace Factorial_Division
{
class Program
{
static void Main(string[] args)
{
long factorialNumber = long.Parse(Console.ReadLine());
long divider = long.Parse(Console.ReadLine());
DiviseNumbers(factorialNumber, divider);
}
static void DiviseNumbers(long factorialNumber, long divider)
{
long multiply = 1;
for (int i = 2; i <= factorialNumber; i++)
{
multiply *= i;
}
long result = multiply / divider;
Console.WriteLine($"{result:f2}");
}
}
}
I am so happy to read this. This is the kind of manual that needs to be given and not the random misinformation that’s at the other blogs.
basketball games
Благодаря !