소스 검색

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

alpo8341 1 년 전
커밋
9789dc00c0
1개의 변경된 파일32개의 추가작업 그리고 0개의 파일을 삭제
  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();
+            }
+        }
+    }
+}
+
+