Browse Source

Был создан новый проект

alpo8341 1 năm trước cách đây
commit
9789dc00c0
1 tập tin đã thay đổi với 32 bổ sung0 xóa
  1. 32 0
      Program (1).cs

+ 32 - 0
Program (1).cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ConsoleApp2
+{
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+            long fact = 1;
+            int h1 = 20; // Факториал какого числа.
+            if (fact == 0)
+            {
+                Console.WriteLine(1);
+            }
+            else
+            {
+                for (int i = 1; i <= h1; i++)
+                {
+                    fact *= i;
+                }
+                Console.WriteLine(fact);
+                Console.ReadKey();
+            }
+        }
+    }
+}
+
+