본문 바로가기
프로그래머/코딩(C#)

_12_while

by FourthWay 2023. 4. 11.
728x90
반응형
using System;

namespace _12_while
{
 internal class Program
 {
  static void Main(string[] srgs)
  {
   int num = 0;
   
   while(num<10)
   {
    Console.WriteLine("나무를 {0}번 찍었습니다.", ++num);
    //1초(1000ms)동안 잠시 멈춰라
    System.Threading.Thread.Sleep(1000);
   }
  }
 }
}

728x90
반응형

'프로그래머 > 코딩(C#)' 카테고리의 다른 글

_15_while_Infinite_loop  (0) 2023.04.12
_13_while_question  (1) 2023.04.12
_10_loop  (2) 2023.04.09
_09_switch_case / switch case  (0) 2023.04.06
_08_if_operator / if문  (4) 2023.03.31