USE stu ll="01" rs=30 do while ll!="00" @2,5 say'请输入年级代码:' font '宋体',20 color RGB(0,0,255) get ll @8,5 say'请输入此年级每考场人数:' font '宋体',20 color RGB(0,0,255) get rs read if ll="00" exit endif set filt to nj=ll ma=1 mb=1 &&两个变量 go top do while not eof() if mb>rs ma=ma+1 mb=1 else replace kc with ma replace zh with mb skip mb=mb+1 endif enddo endd close all