Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure p
- var i,m,M:integer
- m,M:=1
- for i:=1 to n do
- if a[m] < a[i] then
- m:=i
- else
- if a[M] > a[i] then
- M:=i
- endif
- endif
- endfor
- endprocedure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement