⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2004统计.prg

📁 用VFP编写的学生成绩统计系统
💻 PRG
字号:
set talk off
clea all
clos data
set safe off
dime d(16)
dime f(10),r(10)
dime jg(10),yl(10)
store 0 to r,x01,x02,x11,x12,x21,x22,x31,x32,x41,x42,x51,x52,x61,x62,x71,x72,x81,x82,x91,x92
sele 1
gcT = GETFILE('dbf','文件名(N):', '打开',1)
DO CASE
	CASE 'Untitled' $ gcT
		CREATE (gcT)
	CASE EMPTY(gcT)
		modi comm (gcT)
		RETURN
	OTHERWISE
		USE (gcT)
ENDCASE
sele 2
acce"请输入字段个数:" to a
acce"请输入文件名:" to c
crea table &c(zxdm n(4),参考数 n(4),zf n(5,2),jg0 n(4,2),yl0 n(4,2))
a=val(a)
a=int(a)
k=1
for k=1 to a
s='cj'+str(k,1)
w='jg'+str(k,1)
y='yl'+str(k,1)
d='d'+str(k,1)   
alte tabl &c add &s  n(5,2)
alte tabl &c add &w  n(4,2)
alte tabl &c add &y  n(4,2)
alte tabl &c add &d n(4)
endfor
n=5901
do while n<=5908
sele 1
loca all for zxdm=n
coun all to aa for zxdm=n.and.zf>0
coun all to bb for zxdm=n.and.zf>=(3/5)*750
coun all to cc for zxdm=n.and.zf>=(17/20)*750
aver zf for zxdm=n to mm
bb=(bb/aa)*100
cc=(cc/aa)*100
sele 2
appe blan
repl zxdm with n 参考数 with aa zf with mm jg0 with bb yl0 with cc
sele 1
      k=1
      do whil k<=9
      sele 1
      loca all for zxdm=n
      s='cj'+str(k,1)
      w='jg'+str(k,1)
y='yl'+str(k,1)
d='d'+str(k,1)   

      sele 1
      loca all for &s>=1
      coun all to dd for zxdm=n.and.&s>0
      count all to a1 for &s>=((3/5)*150).and.zxdm=n 
      count all to a2 for &s>=((17/20)*150).and.zxdm=n 
      if dd>0
      jg=(a1/dd)*100
      yl=(a2/dd)*100
      aver &s for zxdm=n.and.&s>0 to f
      else 
      jg=0
      yl=0
      f=0
      endif
      sele 2
      repl &d with dd  &s with f  &w with jg  &y with yl
     k=k+1
      enddo
n=n+1
enddo
sele 1
coun all to aa for zf>0
coun all to bb for zf>=(3/5)*750
coun all to cc for zf>=(17/20)*750
aver zf to mm
bb=(bb/aa)*100
cc=(cc/aa)*100
sele 2
appe blan
repl zxdm with 5959 参考数 with aa zf with mm jg0 with bb yl0 with cc
sele 1
      k=1
      do whil k<=9
      sele 1
      s='cj'+str(k,1)
      w='jg'+str(k,1)
      y='yl'+str(k,1)
      d='d'+str(k,1)   
      loca all for &s>=1
      coun all to dd for &s>=1 
      count all to a1 for &s>=((3/5)*150) 
      count all to a2 for &s>=((17/20)*150) 
      jg=(a1/dd)*100
      yl=(a2/dd)*100
      aver &s for &s>0 to f
      sele 2
      repl &d with dd  &s with f  &w with jg  &y with yl
     k=k+1
      enddo
     select 2
     brow
    retu

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -