批处理做双色球随机算号器

要求:
1、可以输入要排除的蓝码和红马,用逗号隔开;

2、可以输入一定要的红码或蓝马,用逗号隔开;

3、结果生成50组随机码,保存为TXT文档。。。

代码约漂亮越好~~~ 有分加!

不知是否满足要求。。。
代码如下:

@echo off
set /p del=排除的红码或蓝马,用逗号隔开(如 03,21):
set /p need=一定要的红码或蓝马,用逗号隔开(如 22,01):
set /a n=0
set /a neex=0
set /a neey=0
set /a neex=%need:~0,2%
set /a neey=%need:~3,2%
set /a delx=%del:~0,2%
set /a dely=%del:~3,2%
:a
set /a h1=%random%%%33+1
set /a h2=%random%%%33+1
set /a h3=%random%%%33+1
set /a h4=%random%%%33+1
set /a h5=%random%%%33+1
set /a h6=%random%%%33+1
if %h1%==%delx% goto a
if %h2%==%delx% goto a
if %h3%==%delx% goto a
if %h4%==%delx% goto a
if %h5%==%delx% goto a
if %h6%==%delx% goto a
if /i %neex% gtr 0 if not %h1%==%neex% if not %h2%==%neex% if not %h3%==%neex% if not %h4%==%neex% if not %h5%==%neex% if not %h6%==%neex% goto a
:b
set /a l1=%random%%%16+1
if %l1%==%dely% goto b
if /i %neey% gtr 0 if not %l1%==%neey% goto b
echo 红球:%h1% %h2% %h3% %h4% %h5% %h6% 篮球:%l1%>>彩票.txt
set /a n=%n%+1
if /i %n% lss 50 goto a
pause
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-06-09
代码没有,但是500万的双色球软件可以实现你说的功能。
下载地址在参考资料中

参考资料:http://soft.500wan.com/ssq/index.shtml

相似回答