• 검색 결과가 없습니다.

[2011 03 31].Ch7.반복문이란무엇인가

N/A
N/A
Protected

Academic year: 2021

Share "[2011 03 31].Ch7.반복문이란무엇인가"

Copied!
15
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

컴퓨터공학실습 1

Part 1

Ch7. 반복문이란 무엇인가

2011-03-31

1

(2)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

목차

반복문이란

while 문

for 문

do ~ while 문

2

(3)

반복문이란

반복문

반복적으로 필요한 작업을 처

리하기 위한 문장

반복문의 예 :

현재 보유한 금액 확인

현재 금액 < 240 만원이면 계

속 저축

현재 금액 >= 240 만원이면

저축 중단

3

(4)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

조건식이 참일 동안 특정 작업 반복 수행

while 문의 기본 문법

(5)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

(6)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

while 무한 loop

조건식의 값이 항상 참인 경우

예 : while(1) { … }

반복문의 내용을 무한히 반복

break 문을 사용하여 탈출

6

(7)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

(8)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

중첩 while 문

while 문 내부에 다른 while 문 정의

바깥쪽 while 문이 한 번 반복될 때마다 안쪽 while 문이

실행됨

8

(9)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

while 문

(10)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

for 문

초기값과 조건식 , 증감값을 명시

for 문의 기본 문법

(11)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

for 문

(12)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

for 문

for 무한 loop

조건식이 항상 참 (1) 이거나 조건식이 생략된 경우

(13)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

for 문

중첩 for 문

for 문 안에 또 다른 for 문을 정의

(14)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

Do ~ while 문

최소 한 번은 반복 수행을 보장

do ~ while 문의 기본 문법

(15)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

Do ~ while 문

참조

관련 문서

- 연쇄법칙을 기억하기 위하여 나뭇가지 그림을 그리는 것이 도움이 된다. 또 로부터 독립변수

변수 이름 x를 만나면 symtable[]에서 해당 위치를 lookup()해서 찾고 저장되어 있는 값을 사용한다 ... E을

¤ 고소작업시 추락방지를 위해 방망, 그물코, 테두리로프, 달기로프, 재봉 사 등으로 구성된 추락방지용 방망을 설치..

④ 독립변수(independent variable)의 유의성 검정 : t-검정을 통해 검정한다 simple regression analysis에서는, independent variable이 하나밖에 없으므 로,

비잒틴과의 젂쟁에서 포로가 된 투르크계 병사들의 이마에 새겨진 문싞을 통해 기독교의 젂파를 확인.. 네스토리우스

에서 정의된 이변수함수 를 생각하고 을 가정하자..

교대로 편도함수는 차분몫을 이용하여 근사적으로 구할 수 있기 때문에 벡터 와 에 의해 결정된 평행사변형을 이용하여 를 근사할

벡터를 정의하고 성질에 대하여 학습한다. 내적(점적)의 정의하고