% Driver for Sort routines
var a:array 1..100 of int
var n:=0
procedure Display(a :array 1..* of int, lo, hi :int)
put "" :4*lo ..
for i :lo..hi put " ", a(i):3 ..
end for
put ""
end Display
put "type several numbers to be sorted, "
loop exit when eof
n += 1; get a(n), skip
end loop
put "input :"
Display(a, 1, n)
put ""
include "sort.merge.t" % choose your sort algorithm
Sort(a, n)
put ""; put "sorted output:"
Display(a, 1, n)