C#
for 또는 while을 이용한 무한 반복 코드2
JAESEONG LEE- developer
2022. 7. 20. 15:47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
using System;
namespace InfiniteWhile
{
class MainApp
{
static void Main(string[] args)
{
int i = 0;
while (true)
Console.WriteLine(i++);
}
}
}
|
cs |
while 을 이용한 무한 반복 코드도 역시 같은 결과를 나타내는 것을 알 수 있다.