1 / 21

Chapter 05. 실행흐름의 컨트롤

Chapter 05. 실행흐름의 컨트롤. 05-1. if 그리고 else.  if 문과 if~else 문. 실행결과. 중괄호는 하나의 문장일 때 생략 가능 ! if~else 는 하나의 문장이다 !. 05-2. switch 와 break.  switch 문의 기본 구성.  switch 문의 예. 변수 n 이 3 일 때. 변수 n 이 5 일 때.  switch 문 + break 문 : switch 문의 일반적 사용 모델.  switch 문 + break 문의 예.

dalton
Télécharger la présentation

Chapter 05. 실행흐름의 컨트롤

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 05. 실행흐름의 컨트롤

  2. 05-1. if그리고 else

  3.  if문과 if~else문 실행결과 중괄호는 하나의 문장일 때 생략 가능! if~else는 하나의 문장이다!

  4. 05-2. switch와 break

  5.  switch문의 기본 구성

  6.  switch문의 예 변수 n이 3일 때 변수 n이 5일 때

  7.  switch문 + break문: switch문의 일반적 사용 모델

  8.  switch문 + break문의 예 변수 n이 2일 때 변수 n이 3일 때

  9. 05-3. for, while 그리고 do~while

  10.  while 반복문 while문은 한번도 실행되지 않을 수 있다! 실행결과

  11.  do~while 반복문 do~while문은 최소 한번은 실행이 된다! 실행결과

  12.  for 반복문 실행결과

  13.  for 반복문과 while 반복문의 비교

  14. 05-4. continue & break

  15.  continue & break문 continue문의 예 break문의 예

  16.  무한루프와 break case 1. case 2. case 3.  6의배수이자 14의 배수인 가장 작은 정수 찾기!  무한루프가 어울리는 사례!

  17. 05-5. 반복문의 중첩

  18.  가장 많이 등장하는 for문의 중첩

  19.  while문도 중첩해 봅시다. 실행결과

More Related