奇怪wxcute兄出的题目很好啊,怎么没人来做。我来做一个:
- @echo off
- setlocal enableDelayedExpansion
- set /a A=%random%%%5*9
- set /a B=(%random%%%3+1)*3
- set "fuhao=+-*/"
- set /a n=0
- echo A=%A% B=%B%
- :calc
- set /a RS=%A%!fuhao:~%n%,1!%B%
- echo A !fuhao:~%n%,1! B = !RS!
- set /a n+=1
- if not "!fuhao:~%n%,1!"=="" goto :calc
- pause>nul
- goto :eof
复制代码
[ 本帖最后由 lhjoanna 于 2008-11-21 00:14 编辑 ] |