본문 바로가기
C#프로그래밍

for문 -줄넘기

by 노재두내 2023. 7. 20.
using System;
using System.Diagnostics.SymbolStore;
using System.Runtime.CompilerServices;

namespace LearnDotnet
{
    internal class Program
    {
        
        static void Main(string[] args)
        {
            int j=0;
            for (int i = 0; i < 5; i++)
            {
                Console.WriteLine("줄넘기를 했습니다.");
            }

            for (int i = 0; i < 4; i++)
            {
                Console.WriteLine("줄넘기{0}를 했습니다.", i + 1);
            }

            for (int i = 0; i < 3; i++)
            {
                Console.WriteLine("쌩쌩이를 했습니다.");
                j = 2 * i;
            }

            Console.WriteLine("-------------------");
            Console.WriteLine("줄넘기를 총 6회 했습니다.",j);

            for (int i = 0; i < 9; i++)
            {
                Console.WriteLine("2 X {0} = {1}", i + 1, (i + 1) * 2);
            }
        }
    }
}

'C#프로그래밍' 카테고리의 다른 글

구구단 2  (0) 2023.07.20
홀짝  (0) 2023.07.20
스타크래프트  (0) 2023.07.19
디아블로 아이템 - Mace of the Crows  (0) 2023.07.19
디아블로 아이템 - Club  (0) 2023.07.19