LOOP:Set I to(START+FINISH)/2
来源:百度知道 编辑:UC知道 时间:2024/06/25 07:46:12
LOOP:Set I to(START+FINISH)/2
If TABLE(I)=ITEM goto FOUND
Else If TABLE(I)<ITEM Set START FINISH to (I+1)
Else Set FINISH to(I-1)
If (FINISH-START)>1 goto LOOP
If TABLE(START)=ITEM goto FOUND
If TABLE(FINISH)=ITEM goto FOUND
Set FLAG to 0
GOTO DONE
FOUND:Set FLAG to 1
DONE:Exit
要求:
(1)画出程序流程图;
(2)程序是结构化的吗?说明理由
(3)若程序是非结构化的,请设计一个结构化的程序实现相同的功能。
并画出盒图,进行黑盒和白盒测试
If TABLE(I)=ITEM goto FOUND
Else If TABLE(I)<ITEM Set START FINISH to (I+1)
Else Set FINISH to(I-1)
If (FINISH-START)>1 goto LOOP
If TABLE(START)=ITEM goto FOUND
If TABLE(FINISH)=ITEM goto FOUND
Set FLAG to 0
GOTO DONE
FOUND:Set FLAG to 1
DONE:Exit
要求:
(1)画出程序流程图;
(2)程序是结构化的吗?说明理由
(3)若程序是非结构化的,请设计一个结构化的程序实现相同的功能。
并画出盒图,进行黑盒和白盒测试
set是什么意思??i set it to your age.是什么意思??
I set you free for loving you,if you come back to me finally,it's meant to be.是什么意思?
I asked for the phone to be put to Mom's ear.一句中的put能换成set吗?
I was beginning to feel set up是什么意思啊?
set one's mind 可以接 to do 吗?
set one\'s mind to do sth 还是set one\'s mind to doing sth doing
set one's mind to do还是to dong/sth
I was astonished to hear that the colour TV set ( )5000 yuan
set one's mind to 后面到底接 do 还是 doing
set up doin 和set to do