Get the App
SLTechnology News&Howtos  ›  Development  › 

How to output n-order Magic Square script in batch processing

Shulou Source: shulou.com Published: 2022-06-03 08:22:14 10月03日 Update

This article shares with you about how batch processing outputs magic square scripts of order n. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

In ancient China, it was called "Hetu" and "Luoshu", also known as "vertical and horizontal map".

The code is as follows:

@ echo off

: start

Set / p n=Please input your odd integer:

Set / a p=n%%2

If p% equ 0 echo Input errorworthy employees go to start

Set / ais% n%

Set / a t = (% n% room1) / 2

Set / a% a% t% birthday% n% recording 1, temptation 1, moulding, mai, 1, etc.

: repeat

Set / a pmurf 1

If p lss 0 goto array

For / l an in (11 m) do (

Setlocal enabledelayedexpansion

If! t! Gtr n set / a twee1

If! i! Gtr n set / an iTunes 1

Set / a slack girls, boys, girls, girls, boys, girls, girls, boys, girls

If! s! Gtr n set / a sound1

If! q! Gtr n set / a QQ 1

Set / an axiomatry in the first place, in the same way as in the past, in the first place in the first place.

Set / a temp+=1

If! temp! Equ% n%

Set / a temptation 1 menagerie tmpfuaxiaxiaqiaozhuangqqqqqqqlechuyun 1meme iMurray

If! q! Equ 0 set / a qroomn

Set / an axioms / tmpies 1

Goto repeat

)

)

Pause

: array

Echo Now behold the powerful Magic Squre ^ ^!:

Set / an axiomatic1

For / l% c in (! n!-1 1) do (

For / l d in (1 1! n!) Do (

Set / a result=a%%d_%%c

Set / paired resultsand nul

Thank you for reading! This is the end of this article on "how to output n-order Magic Square script in batch processing". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it out for more people to see!

Tags: Script output content more article good practical code article Luo Shu read knowledge China Hetu reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MariaDB vpn Apple Microsoft