多谢wxcute老大指正!修改如下:- @echo off
- setlocal enableDelayedExpansion
- set /a A=%random%%%5*9
- set /a B=(%random%%%3+1)*3
- set "fuhao=+-*/"
- :calc
- if "!fuhao:~%n%,1!"=="" pause &exit
- set/a RS=%A%!fuhao:~%n%,1!%B%
- echo %A% !fuhao:~%n%,1! %B% = %RS%
- set /a n+=1 &goto :calc
复制代码
|