C# 언어/C# 문제 풀이3 [C#] 팩토리얼 / 재귀함수 using System.Security.Cryptography.X509Certificates; namespace CShop { class Program { // 팩토리얼 5! = 5 + 4 + 3 + 2 + 1 static int Factorial(int n) { int ret = 1; for (int num = 1; num 2024. 3. 19. [C#] 피라미드 ✳ 피라미드 using System.Security.Cryptography.X509Certificates; namespace CShop { class Program { static void Main(string[] args) { // 피라미드 별모양 for (int i = 0; i < 6; i++) { for (int q = 0; q 2024. 3. 19. [C#] 구구단 ✳ 구구단 2 ~ 9단 using System.Security.Cryptography.X509Certificates; namespace CShop { class Program { static void Main(string[] args) { // 구구단 for (int i = 2; i < 10; i++) { for (int q = 1; q < 10; q++) { Console.WriteLine($"{i} * {q} = {i * q}"); } } } } } 2024. 3. 19. 이전 1 다음