- #1
teng125
- 416
- 0
Consider the following specification:
pre n >= 1
post search module(a, n, number) = FOUND(a, number)
reads a, n, number
changes -
mem -
Remark: Let i be an integer number. Then, FOUND = 0 iff a does not contain
number and FOUND = i iff a = number. search module is the name of the module
to be developed.
Design a search algorithm that searches for an integer number and that suffices the
above specification. Develop the algorithm as a module. Use the pseudo code notation
smby pls help
thanx
pre n >= 1
post search module(a, n, number) = FOUND(a, number)
reads a, n, number
changes -
mem -
Remark: Let i be an integer number. Then, FOUND = 0 iff a does not contain
number and FOUND = i iff a = number. search module is the name of the module
to be developed.
Design a search algorithm that searches for an integer number and that suffices the
above specification. Develop the algorithm as a module. Use the pseudo code notation
smby pls help
thanx