Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- namespace strong_number
- {
- class Program
- {
- static void Main()
- {
- int fact1 = GetInput_Int();
- int fact2 = GetInput_Int();
- BigInteger fact11 = Factorial(fact1);
- BigInteger fact22 = Factorial(fact2);
- Console.WriteLine((fact11 / fact22).ToString("F2"));
- }
- static int GetInput_Int() { return int.Parse(Console.ReadLine()); }
- static double GetInput_Double() { return double.Parse(Console.ReadLine()); }
- static decimal GetInput_Decimal() { return decimal.Parse(Console.ReadLine()); }
- static float GetInput_Float() { return float.Parse(Console.ReadLine()); }
- static bool GetInput_Bool() { return bool.Parse(Console.ReadLine()); }
- static string GetInput() { return Console.ReadLine(); }
- static BigInteger Factorial(int number)
- {
- BigInteger fact = 1;
- for (int i = 1; i <= number; i++)
- {
- fact = fact * i;
- }
- return (fact);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement