[Çü½Ä 1]
|
|
|
|
|
|
|
|
|
|
|
|
{ |
µ¥ÀÌÅ͸í |
} |
|
{ |
POSITIVE |
} |
|
|
IF |
»ê¼ú½Ä-1 |
IS [NOT] |
NEGATIVE |
|
|
|
|
|
ZERO |
|
¨ç
|
µ¥ÀÌÅ͸í°ú »ê¼ú½ÄÀÇ °á°ú °ªÀÌ ¾ç¼öÀÎÁö,
À½¼öÀÎÁö, ZEROÀÎÁö¸¦ ºñ±³ ÆÇ´ÜÇÕ´Ï´Ù. |
[¿¹¹®]
|
¨Í |
IF |
A POSITIVE |
ADD 1 TO
K |
|
|
|
ELSE |
GO TO B-RTN. |
|
¨Î |
IF |
A |
IS NOT NEGATIVE |
GO TO C-RTN |
|
|
ELSE |
MOVE 0 TO K. |
¨Ï |
IF |
A - 30 |
NOT ZERO |
GO TO 1000 |
|
|
ELSE |
|
GO TO 2000. |
|
<Çؼ³>
¨Í
|
A¿¡ ±â¾ïµÈ °ªÀÌ ¾ç¼öÀ̸é K¿¡ 1À» ´õÇØ
ÁÖ¸ç, A¿¡ ±â¾ïµÈ °ªÀÌ ¾ç¼ö°¡
¾Æ´Ï¸é B-RTNÀ¸·Î ¼öÇàÀÌ ¿Å°ÜÁý´Ï´Ù. |
¨Î |
A¿¡ ±â¾ïµÈ °ªÀÌ À½¼ö°¡ ¾Æ´Ï¸é C-RTNÀ¸·Î ºÐ±âÇϸç,
A¿¡ ±â¾ïµÈ °ªÀÌ À½¼öÀ̸é K¿¡ 0À» ±â¾ï½Ãŵ´Ï´Ù. |
¨Ï |
(A - 30)ÀÇ °è»ê °á°ú°¡ 0ÀÌ ¾Æ´Ï¸é 1000À¸·Î ºÐ±âÇϸç,
(A - 30)ÀÇ °è»ê °á°ú°¡ 0À̸é 2000À¸·Î ºÐ±âÇÕ´Ï´Ù. |
|