Dos day17

ForeWord

We again meet in the article, We'll find a way to face our lives. Please you insist to last. I think the Bat Script is very very very best important method to deal Windows Program.

At First

Text

We'll continue to optimizate the Game V3.0Calc_Game3.bat. It likes the below Codes:

复制代码
@ECHO OFF 
ECHO ========Calculation GameV3.0======== 
SETLOCAL ENABLEDELAYEDEXPANSION 
SET /P PF=Please input you want play frequency:
SET S="%TIME:~0,8%"
SET /A ADD=1
SET /A RC=0
SET /A WC=0
FOR /F "tokens=1,2,3 delims=:" %%T IN ("%S%") DO (SET /A T1=3600*%%T + 60*%%U + %%V)
FOR /L %%N IN (1,1,%PF%) DO (
	SET /A RN1=!RANDOM! / 100, RN2=!RANDOM! / 1000, Snum=RN1 * RN2
	ECHO !RN1! * !RN2! ?
	SET /P UI=Please you input the answer:
	IF !UI! EQU !Snum! (ECHO your answer is right) && (SET /A RC=!RC!+%ADD%) ELSE (ECHO you're wrong. The answer is !Snum!) && (SET /A WC=!WC!+%ADD%) 
	SET /A RN3=!RANDOM! / 100, RN4=!RANDOM! / 1000 + 1, Snum2=RN3 / RN4
	ECHO !RN3! / !RN4! ?
	SET /P UI=Please you input the answer:
	IF !UI! EQU !Snum2! (ECHO your answer is right) && (SET /A RC=!RC!+%ADD%) ELSE (ECHO you're wrong. The answer is !Snum2!) && (SET /A WC=!WC!+%ADD%)
	SET /A RN5=!RANDOM! / 10, RN6=!RANDOM! / 10, Snum3=RN5 + RN6
	ECHO !RN5! + !RN6! ?
	SET /P UI=Please you input the answer:
	IF !UI! EQU !Snum3! (ECHO your answer is right) && (SET /A RC=!RC!+%ADD%) ELSE (ECHO you're wrong. The answer is !Snum3!) && (SET /A WC=!WC!+%ADD%)
	SET /A RN7=!RANDOM! / 10, RN8=!RANDOM! / 10, Snum4=RN7 - RN8
	ECHO !RN7! - !RN8! ?
	SET /P UI=Please you input the answer:
	IF !UI! EQU !Snum4! (ECHO your answer is right) && (SET /A RC=!RC!+%ADD%) ELSE (ECHO you're wrong. The answer is !Snum4!) && (SET /A WC=!WC!+%ADD%)
)
SET S2="%TIME:~0,8%"
FOR /F "tokens=1,2,3 delims=:" %%A IN ("%S2%") DO (SET /A T2=3600*%%A + 60*%%B + %%C)
SET /A RS=%T2% - %T1%
ECHO ========Calculation GameV3.0========
ECHO Total Pratices
ECHO Using Time: %RS%s
ECHO Right answer: !RC!
ECHO Wrong answer: !WC!
PAUSE

Now!! I start to play the Game V3.0. It's very interesting and exciting. It likes the below Codes:

复制代码
========Calculation GameV3.0========
Please input you want play frequency:2
76 * 21 ?
Please you input the answer:1596
your answer is right
18 / 26 ?
Please you input the answer:0
your answer is right
1924 + 1917 ?
Please you input the answer:3841
your answer is right
2595 - 1696 ?
Please you input the answer:899
your answer is right
312 * 11 ?
Please you input the answer:3432
your answer is right
319 / 18 ?
Please you input the answer:17
your answer is right
1214 + 2953 ?
Please you input the answer:4167
your answer is right
3038 - 2012 ?
Please you input the answer:12
you're wrong. The answer is 1026
========Calculation GameV3.0========
Total Pratices
Using Time: 225s
Right answer: 7
Wrong answer: 1
请按任意键继续. . .

In the End

I'm pleasure for your watching. Playing the game let me feel happy!! We'll say GoodBye in here. Cheers!! my dear friends, Your PanOne boring and irritable person of human.

相关推荐
WiKiLeaks_successor1 天前
Dos day15
dos
WiKiLeaks_successor8 天前
Dos day10
dos
WiKiLeaks_successor22 天前
Dos day4
dos
spencer_tseng3 个月前
Redis + Nacos.bat
java·windows·dos
带娃的IT创业者4 个月前
穿越回 1980:解读微软开源的“最早 DOS 源码”与操作系统的原点
microsoft·微软·开源·操作系统·dos·源码解析·计算机历史
云雾J视界9 个月前
AI电源的“操作系统”:DSP统一调度四大变换的架构蓝图
dos·电力电子·vrm·pfc·ai电源·llc·数字信号处理器(dsp)
課代表10 个月前
正则表达式中的“*”为何不是通配符?
正则表达式·dos·bat·批处理·匹配·通配符·转义
課代表1 年前
批处理的应用与价值
系统·脚本·dos·变量·批处理·管道·办公
qqxhb1 年前
系统架构设计师备考第22天——信息安全的抗攻击技术
系统架构·dos·arp·密钥选择·ip欺骗·dns欺骗