[swift] 69. while 반복

RudinP·2023년 10월 26일
0

Study

목록 보기
96/227

while 반복

  • 특정 조건 충족하는 동안 반복
  • 중간에 스킵하고자 하면 continue
  • 중간에 while문을 탈출하고자 하면 break
var count : Int = 10

while count > 0{
	count -= 1
    print("\(count)")
}
// 9 8 7 6 5 4 3 2 1 0
profile
곰을 좋아합니다. <a href = "https://github.com/RudinP">github</a>

0개의 댓글