Advertisement
Stan0033

Untitled

Jun 13th, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace strong_number
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9.  
  10. int fact1 = GetInput_Int();
  11. int fact2 = GetInput_Int();
  12. fact1 = Factorial(fact1);
  13. fact2 = Factorial(fact2);
  14.  
  15.  
  16. Console.WriteLine((fact1 / fact2).ToString("F2"));
  17.  
  18. }
  19. static int GetInput_Int() { return int.Parse(Console.ReadLine()); }
  20.  
  21.  
  22.  
  23. static int Factorial(int number) { int fact = 1; for (int loop = 1; loop <= number; loop++) { fact = fact * loop; } return fact; }
  24. }
  25. }
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement