找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1903|回复: 0

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

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

    连续签到: 1 天

    [LV.3]偶尔看看II

    2

    主题

    13

    回帖

    109

    积分

    注册会员

    积分
    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|手机版|小黑屋|百度统计|OpenEdgeStudy快乐学习 ( 沪ICP备15012660号 )

    GMT+8, 2024-4-19 20:24 , Processed in 1.158413 second(s), 22 queries .

    Powered by Discuz! X3.5 Licensed

    © 2001-2023 Discuz! Team.

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