批处理迷你背单词

http://hi.baidu.com/huajinghua/blog/item/ad4f1455dd364ec1b745aed0.html

英语四级快到了,做了个迷你背单词的批处理送给大家,希望大家都能通过四级。哈哈^_^

下载地址:http://huajinghua.go3.icpcn.com/word.htm

   内附本人的生词表。哈哈

(下载后请解压后再运行程序!)

截图如下:

 

 

使用方法:将自己的单词列表按照

英文 中文

的格式添加到word.txt内即可。如:

 

--------------------------------------------------------------------------------------------------------------------------------

大家可以将每天碰到的生单词加进word.txt,然后进行即时测验。

程序源码:

@echo off
setlocal EnableDelayedExpansion
title 迷你背单词 Made by 公孙轩辕 QQ:327828994
color f1
set /a b=0,c=0
for /f "tokens=*" %%i in (word.txt) do (set/a hang+=1)
for /l %%i in (1,1,8) do echo/
echo                 当前单词总数为%hang%个
ping/n 2 127.1>nul&cls
:b
set /a n=%random%%%!hang!+1
for /f "skip=%n% tokens=1,2 delims= " %%i in (word.txt) do (set word=%%i&set content=%%j&call :a&goto :b)
:a
echo/&echo/
echo 当前测试结果:对!c!个,错!b!个&for /l %%i in (1,1,10) do echo/
set/p=%content%: <nul 
set/p a=
if "%a%"=="cx" goto :c
if "%a%"=="%word%" cls&set/p=回答正确,<nul&set/p=答案:%word% %content%<nul&set/a c+=1&echo/&goto :eof
cls&set/p=回答错误,答案:%word% %content%<nul&echo/&set/a b+=1&echo %word% %content%>>error.txt&goto :eof

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值