In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
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!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.