Advertisement
Guest User

blqblq

a guest
Oct 12th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Numerics;
  7.  
  8.  
  9. namespace _13.Factorial
  10. {
  11. class Program
  12. {
  13. //dynamic link library to be added
  14. static void Main(string[] args)
  15. {
  16. int number = int.Parse(Console.ReadLine());
  17. Factorial(number);
  18. }
  19.  
  20. static void Factorial(int number)
  21. {
  22. BigInteger sum = 1;
  23. for (int i = 1; i <= number; i++)
  24. {
  25. sum = sum * i;
  26. }
  27. Console.WriteLine(sum);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement