Guest User

Untitled

a guest
Sep 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class Program
  2. {
  3.  
  4. static void Main(string[] args)
  5. {
  6. int consoleInput = int.Parse(Console.ReadLine());
  7. int result = consoleInput;
  8.  
  9. for (int i = 1; i < consoleInput; i++)
  10. {
  11. result = result * i;
  12. }
  13.  
  14. Console.WriteLine(result);
  15.  
  16. }
  17.  
  18. }
  19.  
  20. class Program
  21. {
  22.  
  23. static void Main(string[] args)
  24. {
  25. int consoleInput = int.Parse(Console.ReadLine());
  26. int result = consoleInput;
  27.  
  28. for (int i = 1; i < consoleInput; i++)
  29. {
  30. result = result * i;
  31. }
  32.  
  33. Console.WriteLine(result);
  34.  
  35. }
  36.  
  37. }
Add Comment
Please, Sign In to add comment