//โปรแกรมอ่านข้อมูลมาพิมพ์ พิมพ์ max ถ้าเงินเดือนสูงกว่าเงินเดือนเงินเดือนโดยเฉลี่ย
use empl
n = 1
tsalary = 0
max = 0
while !eof()
if emplsal > max
max = emplsal
endif
tsalary = tsalary + emplsal
n++
skip
end
avg = tsalary/(n-1)
if max > avg
 ?"ค่าสูงสุดคือ " ,max
endif
inkey(0)