c#/수업 내용

3단 구구단

yeeendy 2023. 1. 3. 10:53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Study01
{
    class Program
    {
        static void Main(string[] args)
        {
            int dan = 3;
            for (int i = 0; i < 9; i++)
            {
                
                int num = i + 1;
                int result = num * dan;
                Console.WriteLine("{0}X{1} = {2}",dan, num, result);
            }

        }
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Study01
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 9; i++)
            {
                int num = i + 1;
                int num1 = num * 3;
                Console.WriteLine("3 X {0} = {1}",num, num1);
            }

        }
    }
}

'c# > 수업 내용' 카테고리의 다른 글

별찍기  (0) 2023.01.03
구구단(2~9단)  (0) 2023.01.03
1/2 스타크래프트 종족 선택  (0) 2023.01.02
1/2 고블린  (0) 2023.01.02
1/2 늑대1  (0) 2023.01.02