欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

批處理檢查輸入實現(xiàn)代碼

 更新時間:2009年12月23日 23:53:47   作者:  
用批處理實現(xiàn)的只可以輸入指定的格式的字符,否則5此后退出。
復(fù)制代碼 代碼如下:

@echo off
set m=0
:agn
set /a m+=1
if %m% gtr 5 (
echo.五次的機會已經(jīng)用完,3秒后將自動退出...
ping -n 4 127.1>nul
goto :eof
)
set input=&set /p input=請輸入3至10個英文字母:
if not defined input (echo.內(nèi)容不能為空!!!&goto :agn)
echo.%input%|findstr /i /v "^[a-z]*$" >nul&&(echo.請輸入純英文字母!!!&goto :agn)
set n=0
:count
set /a n+=1
if not "%input:~1%"=="" (set input=%input:~1%&goto :count)
if %n% lss 3 (
echo.輸入的字母不能少于3個!!!請重新輸入!!!
goto :agn
) else (
if %n% gtr 10 (
echo.你輸入的太多了!!!請重新輸入!!!
goto :agn
)
)
set /p=你輸入的內(nèi)容在允許的范圍內(nèi)...請按任意鍵退出...<nul
pause>nul
goto :eof

相關(guān)文章

最新評論