가끔 이렇게 적적한 기분이 든다...

먼가 내 속이 텅 빈거 같은 느낌...

이럴땐 영화를 봐도, 드라마를 봐도, 게임을 해도...

그런 적적한 느낌은 지울 수가 없다.

공부에 집중을 해보지만, 그 또한 여의치 않는듯 하다...

아웅~~~!!! 차라리 먼가에 집중이라도 할 수 있다면... 좋으련만...

집중집중!!!

1. 전화모드에서 97#*7*980# 을 차례대로 입력

2. 2를 눌러 버젼 정보를 확인
햇살이 눈부시게 내리는 날에
가만히 창밖을 보면
문득 편안함이 나를 지배하는 것을 느낀다...

편안함이 나도 모르게 날 지배할 때 쯤
어딘가 허전함이 느껴지곤 하는데...

몸을 이리저리 돌려보아도...  다른 생각을 해보아도...
그 허전함은 여전히 나와 같이 한다...

그건... 네가 없기 때문이얌~ @^-^@
어여 내 곁으로 와~


@^-^@ 밥먹구 아이스크림을 물고있는 우리 랩짱 현석이 형~~~

한때 살이 통통하게 오를대로 오른 원주~ 어우 볼살과 배봐봐~ ㅋㅋ

끝까지 사진 찍기를 거부하다가 결국엔~ ㅋㅋ
생긴것두 잘 생긴넘이... 에잉~~~

Introduction

Pseudo code (or Structured English) is used to specify program logic in a (somewhat) English like manner, that aims to be independent of any particular programming language. This simplifies program development by separating it into two main parts, logic design and coding. The use of pseudo code allows the programmer to focus on the logic of the program rather than implementation details such as how data is displayed Once the logic is developed, coding becomes the translation of the pseudo code into the required programming language.

Sequence

Assignment

Format

variable = expression

Examples

total = 0
y = x * x + z / 4 - 1
name = "Joan Smith"
validLength = True

Input

Format

Input variable, variable, ...

Examples

Input custName
Input distance, speed

Display

Format

Display value, value, ...

Examples

Display "Hello World"
Display totalPrice, taxPayable
Display "Customer Number: ", custNum, "Name: ", custName

Selection

If-Else

Format

IF condition THEN
   statement

   statement
   ...
ENDIF
 

IF condition THEN
   statement

   statement
   ...
ELSE
   statement

   statement
   ...
ENDIF
 

IF condition THEN
   statements

ELSE
   IF condition THEN
       statements

   ELSE
       IF condition THEN
           statements

       ELSE
          statements

       ENDIF
   ENDIF
ENDIF
 

IF condition THEN
   statements

ELSE IF condition THEN
   statements
ELSE IF condition THEN
   statements

ELSE
   statements

ENDIF

Note: the Else part is optional. Use it where required by the logic.

Examples

IF lineNumber > 50 THEN
   Display ""
   Display "Student Number", "Student Name"
   lineNumber = 0

ENDIF
 

IF monthNumber >= 1 AND monthNumber <= 12 THEN
   Display "valid month"

ELSE
   Display "invalid month"

   Display "Month must be between 1 and 12"
ENDIF
 

IF mark >= 80 THEN
   grade = "A"

   comment = "Excellent"
ELSE
   IF mark >= 70 THEN
       grade = "B"

   ELSE
       IF mark >= 60 THEN
           grade = "C"

       ELSE
           IF mark >= 50 THEN
               grade = "D"

           ELSE
               grade = "N"
               comment = "Poor"
           ENDIF
       ENDIF
   ENDIF
ENDIF
 

IF mark >= 80 THEN
   grade = "A"

   comment = "Excellent"
ELSE IF mark >= 70 THEN
   grade = "B"
ELSE IF mark >= 60 THEN
   grade = "C"

ELSE IF mark >= 50 THEN
   grade = "D"
ELSE
   grade = "N"
   comment = "Poor"
ENDIF

Iteration (Repetition)

For

Format

FOR counter = start-value to end-value DO
   statement
   statement
   ...
ENDFOR

Example

FOR x = 1 to 10 DO
   xSquared = x * x
   Display x, xSquared
ENDFOR

While

Format

WHILE condition DO
   statement
   statement
   ...
ENDWHILE

Example

count = 1
WHILE count <= 10 DO
   Display count
   Add 1 to count
ENDWHILE

Programs

Format

program-name()
   statement

   statement
   ...
STOP

Example

addTwoNumbers()
   Input number1, number2
   sum = number1 + number2
   Display sum
STOP 

Subprograms: Subroutines and Functions

Subroutines

Subroutines are also called procedures or void methods. Subroutines do not return a value.

Format - subroutine calls

subroutine-name()
subroutine-name(parameter, parameter, ...)

Examples - subroutine calls in a program

demoProgram()
    ...
   displayTenStars()

   displayAverage(count, total)
STOP

Format - subroutine declarations

subroutine-name()
   statement
   statement
   ...
EXIT

subroutine-name(parameter, parameter, ...)
   statement
   statement
   ...
EXIT

Examples - subroutine declarations

displayTenStars()
   FOR numStars = 1 to 10 DO
       Display "*"
   ENDFOR
   Display ""
EXIT

displayAverage(count, total)
   IF count > 0 THEN
       average = total / count
       Display average
   ELSE
       Display "Error, nothing to average"
   ENDIF
EXIT

Functions

Functions are also called non-void methods. Functions return a single value.

Format - function calls

function-name()
function-name(parameter, parameter, ...)

Examples - function calls in a program

demoProgram()
    ...
   month = inputMonth()

   IF oddNumber(month) THEN
       ...

   ENDIF
   volume = 4 /3 * PI * cube(radius)
   max = maximumNumber(a, b)
STOP

Format - function declarations

The following are called functions. They return a single value.

function-name()
   statement
   statement
   ...
RETURN with value

function-name(parameter, parameter, ...)
   statement
   statement
   ...
RETURN with value

Examples - function declarations

inputMonth()
   Input monthNumber
   WHILE monthNumber < 1 OR monthNumber > 12 DO
       Display "Error invalid month number"
       Input monthNumber
   ENDWHILE
RETURN with monthNumber

oddNumber(num)
   oddNumber = false
   IF num modulus 2 = 0 THEN
       oddNumber = true
   ENDIF
RETURN with oddNumber

cube(number)
   cube = number * number * number
RETURN with cube

maximumNumber (number1, number2)
   IF number1 >= number2 THEN
       maximumNumber = number1
   ELSE
       maximumNumber = number2
   ENDIF
RETURN with maximumNumber

Keywords

The following words have a special meaning in Pseudo Code (in this subject) and should only be used for the purposes described above.

AND, DO, ELSE, ENDIF, ENDFOR, ENDWHILE, EXIT, FOR, IF, NOT, OR, RETURN, STOP, THEN, TO, WHILE.

Other statements: Display, Input
Operators:  =, +, -, *, /, (), <, <=, >, >=, []

어떻게 보면, 나도 예전의 그녀를 아직도 기억하고, 추억하는 것은...

그녀가 그리운 것이 아니라... 그때 그 시절이 그리운 것일지도...

지금 그녀가 다시 내 앞에 나타난다해도,

그때의 그녀가 아니며, 그때의 내가 아니니까...

Thinking Silver Zero...

나도 세잎클로버의 그녀를 만나고 싶다.

네잎클로버의 그녀보다는 내가 그녀의 어느 한 부분이 될 수 있는,

그런 세잎클로버의 그녀가 좋다.

나 역시 세잎클로버이기에...

최근에 "101번째 프로포즈"란 드라마를 보았다.

극 중 달재는 네잎클로버의 그녀를 만났다. 그녀를 위해서 그 어떤 일도 하는 달재는

결국 그녀의 사랑을 얻었다.

하지만, 내가 볼 때에는 그녀는 달재에게 만큼은 세잎클로버였다.

그건 달재가 그녀의 한 부분이 되었기 때문이 아닐까?...

Thinking Little Squirrel...

맞아... 문득문득 사소한 것에서 남들은 느끼지 못하는 것을

나는 느끼고 있는것...

그게 아마 내가 사랑을 했었다는 증거겠지...

그런게 추억일테고...

Thinking YS...

듣고서 너무 좋았던 말...

@^-^@

+ Recent posts