Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FactorialDivision
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- Console.WriteLine($"{(Factorial(a) / Factorial(b)):f2}");
- }
- static double Factorial(int n)
- {
- if (n == 0)
- {
- return 1;
- }
- return n * Factorial(n - 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement