while ( 조건 ) = while 문 안에 있는 조건이 true라면 반복한다. 예시: int i = 1 // i = 1이다.while (i 10번 반복하여 출력하게 된다.for(초기화;조건;증가)for(int i = 1 ; i ※ i -- 도 된다. foreach(변수 ; 컬렉션)배열이나 컬렉션에서, 각 요소들을 하나하나 가져와 루프를 돌 때 foreach문을 사용한다. string[] cities = new string[] {"seoul","busan","london"}foreach(string s in cities) // in 뒤엔 컬렉션을 집어넣음. 앞부분엔 컬렉션으로부터 요소를 가져오는 변수를 집어넣는다.{ Console.WriteLine(s); } 번외) london만 따로 출력하고 싶을땐..