OpenEdge Study - QAD

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 173|回复: 0

一个PROGRESS猜数子小游戏,适合幼儿园刚学数子大小的小朋友玩

[复制链接]
  • TA的每日心情
    无聊
    2020-8-13 10:32
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    2

    主题

    15

    帖子

    109

    积分

    注册会员

    Rank: 2

    积分
    109
    发表于 2020-8-1 18:04:45 | 显示全部楼层 |阅读模式
    先由A输入一个数子,再由B去猜,会提示数子大了还是小了
    define variable dn as integer  label "请输入一个整数".
    define variable i as integer label "你一共猜了多少次".
    define variable dn_1 as integer.
    define variable choose as integer.
    define variable str01 as char format "x(20)" label "提示".
    define frame b skip(1) with centered three-d side-label.
    define frame a with centered.
    define frame c with centered no-box.
    disp "猜数子小游戏" with frame c.
    repeat:
    i = 0.
    choose = 0.
    dn = 0.
    update dn with frame b.
    dn_1 = dn.
    dn = 0 .
    display dn with frame b.
    repeat:
        i = i + 1.
        update choose with frame a.
        if choose = dn_1 then do:
             str01 = "恭喜你答对了".
             dn = dn_1.
             display dn with frame b.
             display str01 i with frame a.
             leave .
        end.
        else if choose > dn_1 then do:
            str01 = "太大了".
            display str01  with frame a.
        end.
        else if choose < dn_1 then do:
            str01 = "太小了".
            display str01 with frame a.
        end.
        end.
    end.

    该会员没有填写今日想说内容.
    *滑动验证:
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|小黑屋|手机版|OpenEdge Study - QAD ( 沪ICP备15012660号 QAD OpenEdge Study385468063

    GMT+8, 2020-10-26 21:05 , Processed in 0.769048 second(s), 41 queries .

    Powered by Discuz! X3.4 Licensed

    © 2001-2017 Comsenz Inc.

    快速回复 返回顶部 返回列表