- @echo off
- set s=1
- set t=9
- set p=9
- set /p page=请输入辞典的页码:
- set count=1
-
- :start
- if %p% geq %page% goto calc
- set /a count+=1
- set /a p*=10
- set /a t+=p*count
- goto start
- :calc
-
- set /a t-=p*count
- set /a t=(page-t)/count
- set /a count-=1
- for /l %%i in (1,1,%count%) do set /a s*=10
- set /a s+=t-1
- set /p=这本辞典共有%s%页。
复制代码
|