输入一个固定长度的数组,并输入一个要查找的数,给出能不能检索到的伪代码并测试
0 |
60 |
1 |
75 |
2 |
95 |
3 |
80 |
4 |
65 |
5 |
90 |
Length=6 Read in array of values
Set position to 0
Weite “enter value for which to search”
Read searchitem=75
Set found to true if searchitem is there
While (position <6)
IF(found)
Write “item is found”
continue
ELSE
Write ”item is found”
found Position 1-->75
Continue can not found
end