VBS 猜数游戏

2018-11-09  21:19:11

by xutao

 msgbox "The Swami" ,,"Game"
msgbox "The system will give a integer in the range of 1 to 100 randomly, and you are allowed to guess a integer one time! Less tries, more luck" , ,"Rule"
while = '无限循环 dim tryTime '尝试次数
tryTime = dim n
randomize '初始化随机种子,不然每次都会一样
n = int(rnd*) int input
input = int(inputbox("Guess it")) '注意:while语句的语法是: while condition ... wend (不加then) while n <> input
tryTime = tryTime+
if input>n then
input = int(inputbox("Too big! Try again!"))
else
input = int(inputbox("Too small! Try again!"))
end if
wend if tryTime= then
msgbox "Genius! Buy a lottery ticket quickly!"
elseif tryTime= then
msgbox ""
elseif tryTime= then
msgbox "NB"
elseif tryTime= then
msgbox "Cool!"
elseif tryTime= then
msgbox "Good!"
elseif tryTime= then
msgbox "Not Bad!"
elseif tryTime= then
msgbox "Unfortuntate!"
elseif tryTime= then
msgbox "Idiot!"
else
msgbox "SB!"
end if if msgbox("ReTry?",vbOK)<> then
msgbox "Bye!"
wscript.quit
end if wend

VBS猜数游戏的更多相关文章

  1. 【BZOJ 1594】 [Usaco2008 Jan]猜数游戏 (二分+并查集)

    1594: [Usaco2008 Jan]猜数游戏 Description 为了提高自己低得可怜的智商,奶牛们设计了一个新的猜数游戏,来锻炼她们的逻辑推理能力. 游戏开始前,一头指定的奶牛会在牛棚后面 ...

  2. usaco 猜数游戏

    Description 为了提高智商,锻炼思维能力,奶牛设计了一个猜数游戏.游戏开始前,贝西会在牛棚后面摆上N个数字.所有数字排成一条直线,按次序从1到N编号.每个数字在1到10^9之间,没有两个数字 ...

  3. (一)Python之猜数游戏

    猜数游戏由简如深的编码学习过程: 3次机会: print('------------------我爱鱼C工作室------------------')count=0while count < 3 ...

  4. 猜数游戏-flag的运用

    package my;import java.util.Scanner;public class MyJava {        public static void main(String[] ar ...

  5. Java课程设计——猜数游戏(201521123111 陈伟泽)

    Java课程设计--猜数游戏(201521123111 陈伟泽) 1.团队课程设计博客链接 博客作业--猜数游戏 2.个人负责模块或任务说明 Answer:一些基础界面的构造,排行榜的构造,用文件录入 ...

  6. JAVA课程设计 猜数游戏 团队

    团队名称,成员介绍 名称: 猜数游戏 成员: 网络1514 201521123086 周颖强 网络1514 201521123087蒋勃超 项目git地址 git.oschina.net/jbc113 ...

  7. BZOJ 2222: [Cqoi2006]猜数游戏【神奇的做法,傻逼题,猜结论】

    2222: [Cqoi2006]猜数游戏 Time Limit: 20 Sec  Memory Limit: 259 MBSubmit: 604  Solved: 260[Submit][Status ...

  8. 从scratch到python——猜数游戏

    ` 之前讲解了从scratch到python,基于python turtle库的实现,讲解了用scratch和python turtle绘图的实现,以及让小猫动起来和当角色被单击的例子. 本节课讲继续 ...

  9. 【BZOJ1594】[Usaco2008 Jan]猜数游戏 二分答案+并查集

    [BZOJ1594][Usaco2008 Jan]猜数游戏 Description 为了提高自己低得可怜的智商,奶牛们设计了一个新的猜数游戏,来锻炼她们的逻辑推理能力. 游戏开始前,一头指定的奶牛会在 ...

随机推荐

  1. IIS7.5配置过程

    1.Windows功能,注意选择应用程序开发功能,否则不能使用经典模式. 2.Cmd运行(使用.netframework4.0)C:\Windows\Microsoft.NET\Framework\V ...

  2. JSViews--JQuery系的MVVM框架

    JSViews https://github.com/BorisMoore/jsviews JsViews: next-generation MVVM and MVP framework - brin ...

  3. php 随机生成数字字母组合

    直接上代码: function getRandomString($len, $chars=null) { if (is_null($chars)) { $chars = "abcdefghi ...

  4. Debian Security Advisory(Debian安全报告) DSA-4415-1 passenger security update

    Debian Security Advisory(Debian安全报告) DSA-4415-1  passenger security update Package : passenger CVE I ...

  5. 缓存dom查询

    为了提高性能缓存dom查询; 页面效果:

  6. Codeforces 1065E(计数)

    题目链接 题意 限定字符串长度为$n$,字符集规模为$A$,以及$m$个数字$b$,对于任意数字$bi$满足长度为$bi$的前缀和后缀先反转再交换位置后形成的新串与原串视作相等,问存在多少不同串. 思 ...

  7. 【webpack】使用DllPlugin拆分模块

    开发过程中,我们经常需要引入大量第三方库,这些库并不需要随时修改或调试,我们可以使用DllPlugin和DllReferencePlugin单独构建它们. 具体使用如下: const HtmlWebp ...

  8. Leetcode#561. Array Partition I(数组拆分 I)

    题目描述 给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最 ...

  9. 影子节点 shadowDOM

    示例: <video controls autoplay name="media"> <source id="mp4" src="t ...

  10. 使用RocketMQ实现分布式事务

    .. todo ref https://blog.csdn.net/zhejingyuan/article/details/79480128