
CODE: [Copy to clipboard]第二问:@echo off
for /l %%i in (1,1,n) do call :lp %%i
pause>nul&goto :eof
:lp
armcc a%1.c>temp.txt
for /f "delims=" %%i in (temp.txt) do set str=%%i
echo %str%&del /q temp.txt
CODE: [Copy to clipboard]第三问:@echo off
for /l %%i in (1,1,n) do call :lp %%i
echo the number for wrong is %num%
pause>nul&goto :eof
:lp
armcc a%1.c>temp.txt
for /f "tokens=2 delims= " %%i in (temp.txt) do set str=%%i
set /a num+=%str%&del /q temp.txt
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-5-30 at 09:53 PM ]@echo off
for /l %%i in (1,1,n) do armcc a%%i.c>nul|findstr /c:"0 errors"||goto :eof
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |