| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1737 人关注过本帖
标题:求助,问别人要的一个高考分数分段的程序,这些代码什么意思,需要怎么用啊
只看楼主 加入收藏
qq957221564
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2016-11-7
结帖率:0
收藏
 问题点数:0 回复次数:5 
求助,问别人要的一个高考分数分段的程序,这些代码什么意思,需要怎么用啊
USE gk2016yj
set dele on
SET TALK OFF
zsl=18723
    km='zkcj'
    INDE ON -&km TO in1
*1/6
    sl=zsl/6
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*2/6
    sl=2*zsl/6
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*3/6
    sl=3*zsl/6
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*4/6
    sl=4*zsl/6
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*5/6
    sl=5*zsl/6
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*6/6
    sl=zsl
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*1+1/3
    sl=zsl*(1+1/3)
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*1+2/3
    sl=zsl*(1+2/3)
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
*2
    sl=2*zsl
    GO TOP
    SKIP sl-1
    zz1=&km
    COUN FOR &km>zz1 TO x1
    COUN FOR &km>=zz1 TO x2
    xx=IIF(sl-x1<x2-sl,x1,x2)
    ?km+SPAC(2)+STR(xx,5)+'人:  '
        IF xx=x1
            COUN FOR &km>zz1 TO a
        ELSE
            COUN FOR &km>=zz1 TO a
        ENDIF
        go top
        skip a-1
        jzf=&km
        ??STR(jzf,3)+SPAC(2)
retu
搜索更多相关主题的帖子: 高考分数 
2016-12-07 14:23
schtg
Rank: 12Rank: 12Rank: 12
来 自:Usa
等 级:贵宾
威 望:67
帖 子:1731
专家分:3324
注 册:2012-2-29
收藏
得分:0 
太复杂啦,应该还有更简单的哈。
2016-12-07 16:17
cxzbzgz
Rank: 8Rank: 8
来 自:云南楚雄
等 级:贵宾
威 望:24
帖 子:298
专家分:808
注 册:2012-6-15
收藏
得分:0 
回复 2楼 schtg
假如你的数据库表名是CJK.DBF,总分字段名为ZF,可以用如下两条命令解决你的问题
SELECT *,PADL(CEILING(zf/10)*10-9,3)+"--"+PADL(CEILING(zf/10)*10,3) fsd FROM cjk INTO CURSOR tmp WHERE zf<>0
SELECT fsd,cnt(*) rs FROM tmp GROUP BY fsd ORDER BY fsd DESC


学习交流VFP,QQ:248561326。
2016-12-08 08:39
qq957221564
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2016-11-7
收藏
得分:0 
回复 3楼 cxzbzgz
谢谢亲的帮助
2016-12-08 09:48
schtg
Rank: 12Rank: 12Rank: 12
来 自:Usa
等 级:贵宾
威 望:67
帖 子:1731
专家分:3324
注 册:2012-2-29
收藏
得分:0 
@cxzbzgz:谢谢!
2016-12-08 19:32
hgzgrg
Rank: 1
等 级:新手上路
威 望:1
帖 子:13
专家分:3
注 册:2013-12-17
收藏
得分:0 
值得学习
2016-12-22 10:43
快速回复:求助,问别人要的一个高考分数分段的程序,这些代码什么意思,需要怎么 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.032464 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved