1 / 5

인터넷 II

인터넷 II. 멀티미디어 1 학년 D 반 2011644 이상현. [ 필수문제 1] 숫자 하나를 입력 받아서 절대값이 5 보다 크면 입력숫자를 절대값으로 출력한다 . 예 ) 입력숫자 -6 이면 출력숫자 6 입력숫자 4 이면 출력없음 입력숫자 8 이면 출력숫자 8. START. A. READ A. A>0. FALSE. TRUE. A=-1*A. A>5. TRUE. FALSE. PRINT A. STOP. [ 필수문제 2]

kioshi
Download Presentation

인터넷 II

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. 인터넷 II 멀티미디어 1학년 D반 2011644 이상현

  2. [필수문제 1] 숫자 하나를 입력 받아서 절대값이 5 보다 크면 입력숫자를 절대값으로 출력한다. 예)입력숫자 -6 이면 출력숫자 6 입력숫자4 이면 출력없음 입력숫자8 이면 출력숫자 8 START A READ A A>0 FALSE TRUE A=-1*A A>5 TRUE FALSE PRINT A STOP

  3. [필수문제 2] 임의의 정수 n을 입력받아서 구구단 n단을 출력한다. n이 1~9 범위의 수일 때만 구구단을 출력한다. 예)n = 5 일때, 5 * 1=5 5 * 2=10. . . 5 *9=45 START n, A=0, B READ n 1<=n<=9 FALSE TRUE WHILE (9>=n) B=A*n PRINT n ”*” A ”=“ B A=A+1 STOP

  4. [필수문제 3] 정수 n을 입력받아서, 다음과 같은 식의 합을 출력한다. 1/2 + 2/3 + 3/4 + ... + n/(n+1) START num, A, B, total READ num WHILE (A<=num) A=A+1 B={A/(A+1)} sum=sum+B PRINT total STOP

  5. [필수문제 4]10개의 숫자를 입력받아서 홀수의 개수와 짝수의 개수를 출력한다. START num, count,hol,jjak WHILE (count <=10) count=count+1 READ num Num%2==0 TRUE FALSE hol= hol+1 jjak= jjak+1 PRINT jjak, hol STOP

More Related