fkfreedom 当前离线
列兵
2 5 5 5 1 9 9 6复制代码
评分人数
applba 当前离线
中校
@echo off for /f %%i in (1.txt) do ( set /a n+=1 set /a sum=sum+%%i ) echo %n% %sum% set /a t1=(sum*10)/n set /a t2=t1/10 echo %t2% if %t1:~-2,1% gtr 4 set /a t2=t2+1 echo 结果是%t2% pause复制代码
TOP
Hello123World 当前离线
荣誉版主
@echo off&setlocal enabledelayedexpansion for /f %%i in (test.txt) do (set /a a=!a!+%%i set /a b=!b!+1) set /a c=%a%/%b% echo %c% pause>nul复制代码
caruko 当前离线
for /f %%i in (test.txt) do set /a a+=%%i,b+=1 set /a c=a/b echo,%c%复制代码