//โปรแกรมแสดงข้อสอบแบบสุ่ม ให้เลือกตอบแล้วบอกว่าถูกหรือผิด
use nques
arnum = array(reccount())
for i = 1 to reccount()
   rnd = mod(second()*100,reccount())+1
   if ascan(arnum,rnd) = 0
   arnum[i] = rnd
   else
   i--
   endif
next
for i = 1 to reccount()
   go arnum[i]
   _ans = space(1)
   ? "คำถาม",ques
   ? "1. ",choice1
   ? "2. ",choice2
   ? "3. ",choice3
   accept to _ans
   if ans = _ans
   ? "ท่านตอบถูก"
   else
   ? "ท่านตอบผิด"
   endif
next