看板Programming
标 题Re: [问题] 不知道用什麽写比较适合
发信站KKCITY (Thu Sep 14 10:06:56 2006)
转信站ptt!ctu-reader!ctu-gate!news.nctu!news.ntust!news.ntu!news.au!zoonews.
※ 引述《[email protected] (喵~~~)》之铭言:
> ※ 引述《[email protected] (上班==上网??)》之铭言:
> : 【 在 [email protected] (悠闲自在...) 的大作中提到: 】
> : 取乱数就好啦
> : 至於要用什麽语言嘛...看你高兴
> : 刚刚用C试一下 短短几行
> : 用了random跟exec相关的函数就完成罗
> 这种东西,写批次档就可以了...
> 程式效率很差,因为我不知道批次档怎麽写四则运算
^^^^^^^^
你是指这个吗?
set /a x=10
set /a y=2
set /a z=x+y
::Win2000(NT4?)以後可, 9x不行
> 随便开个纯文字档案,把下面的程式复制上去
> 然後存档成 choosefile.bat
> @echo Start
> :START
> @set ttr=%random%
> @if %ttr% GTR 2 goto START
> @echo Get %ttr%
> @if %ttr% EQU 0 goto S1
> @if %ttr% EQU 1 goto S2
> @goto S3
> :S1
> 1.exe
> @goto end
> :S2
> 2.exe
> @goto end
> :S3
> 3.exe
> :end
> @echo End
> @set ttr=
--
┌─────◆KKCITY◆─────┐ ◢
◤ 找歌最方便 KKBOX 歌词搜寻!!
│ bbs.kkcity.com.tw │ \^_^ / ★http://www.kkbox.com.tw★
└──《From:24.218.41.138
》──┘ ◤ 唱片公司授权,音乐尽情下载
--