more 当前离线
技术组成员
@echo off setlocal enabledelayedexpansion for /l %%a in (1,1,100) do ( for /l %%b in (%%a,1,100) do ( for /l %%c in (%%b,1,100) do ( set /a aa=%%a*%%a+%%b*%%b set /a ab=%%c*%%c if !aa!==!ab! echo %%a %%b %%c ) ) ) echo.&pause复制代码
TOP
foxJL 当前离线
荣誉版主
@echo off set x=1 set /p max=打印出多少以内的勾股弦组合(勾^>3): :x set /a x+=2,s=x*x,y=s/2,z=y+1 echo %x%,%y%,%z% if %x% lss %max% goto x pause复制代码