본문 바로가기
언어/[C#]

[C#] for문 (for loop)

by 조랩 2023. 3. 1.
using System;

namespace MyFirstProgram
{
    internal class Program
    {

        static void Main(string[] args) // main method
        {
            // for

            for (int ii = 0; ii < 10; ii++)
            {
                Console.WriteLine(ii);
            }

            for (int jj = 10; jj > 0; jj--)
            {
                Console.WriteLine(jj);
            }

            Console.WriteLine("Happy New Year!!!");

        }
    }
}
728x90