Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Yang Hui Triangle effect by batch bat

Shulou Source: shulou.com Published: 2022-06-03 08:42:51 10月26日 Update

This article mainly introduces the batch processing bat how to achieve Yang Hui triangle effect, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Effect picture:

The code is as follows:

@ echo off&color 0e

Setlocal enabledelayedexpansion

Mode con: cols=130 lines=130

: top

Cls

:: set / p in= Please enter the number of lines:

Set in=23&set ab=1&set var=64

If "% in%" = "" goto top

If in% geq 35 goto top

If in% leq 0 goto top

Echo% in% | findstr / r "^ [0-9] [0-9] * $" > nul 2 > nul | | goto top

Set str=1

For / l%% I in (1JI% in%) do (

Set num=

Set num2=0

For an in (! str!) Do (

Set / a num2+=1

If! Num2 chocolate 1 set "str1="

Set / a num1=%%a+num

Set "str1century str1!! num1!"

Set num=%%a

)

Call: lis "! str1:~1!"

Set "stringency str1! 0"

)

Rem and output an inverted pyramid to play.

For / l an in (22-11) do echo! nam%%a!

For / l% I in (1 1 3) do (

For an in (a b c d e f) do (

Color 0% a

Ping/n 2 127.1 > nul

))

Exit

: lis

Set max=%~1

For / l% an in (0 1 300) do (

If not "! max:~%%a,1!" = "" set / a ci+=1

)

Set / a ki=var-ci/2

For / l an in (1 1! ki!) Do set kg=! kg!

Echo! kg!!max!

Set nameless abutting and kgrubbing max!

Set / an ab+=1

Set ci=0&set kg=

Goto: eof

Thank you for reading this article carefully. I hope the article "how to achieve Yang Hui Triangle effect by batch bat" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles effects Yang Hui Triangle Yang Hui Triangle Code value interest at the same time rendering more Friends knowledge Tape Industry Information Information Channel Golden word Pyramid Channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Docker Xiaomi Apple