Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lo-Shu Squares

25 views
Skip to first unread message

Mike Sanders

unread,
May 21, 2017, 2:53:17 PM5/21/17
to

Said one Eastern man: It is your wrong consciousness...

Replied one Western man: Let us not judge others,
instead, let us learn from the other =)


@echo off & setlocal enabledelayedexpansion

:: Lo-Shu Square Generator: Michael Sanders - 2017
:: https://busybox.hypermart.net/lo-shu-squares.html

:magic

set g4=492357816834159672618753294276951438
set g8=816357492672159834294753618438951276
set m=%g4%%g8%&set n=0&set a=&set b=&set c=
set/a r=(%random%%%8)*9

:lo-shu

call set/a a=%r%+!n!
call set/a b=!a!+3
call set/a c=!a!+6
call set x=!x!%%m:~!a!,1%% &::
call set y=!y!%%m:~!b!,1%% &::
call set z=!z!%%m:~!c!,1%% &::
call set/a n+=1&if !n! lss 3 goto :lo-shu

:done

cls&echo.!x!&echo.!y!&echo.!z!
if %0=="%~0" pause>nul|set/p =any key to exit...
endlocal&exit/b



--
later on,
Mike

https://busybox.hypermart.net

Batchman

unread,
May 22, 2017, 8:04:09 PM5/22/17
to
Mike Sanders wrote:

> Replied one Western man: Let us not judge others,
> instead, let us learn from the other =)
>
Hear, hear!
>
> @echo off & setlocal enabledelayedexpansion
>
> :: Lo-Shu Square Generator: Michael Sanders - 2017
> :: https://busybox.hypermart.net/lo-shu-squares.html

Nice work!

Mike Sanders

unread,
May 28, 2017, 5:49:12 PM5/28/17
to
Batchman <batc...@dosville.foo> wrote:

> Nice work!

Thank you kind sir!
0 new messages