SMALL Basic: Printing Binary Mountain pattern

SMALL Basic: Printing Binary Mountain pattern

Subscribers:
612
Published on ● Video Link: https://www.youtube.com/watch?v=6r4v0x2YrsE



Duration: 6:13
18 views
0


SMALL Basic: Printing Binary Mountain pattern

This is the final code:
word = "1"
wl = Text.GetLength(word)
n=0

TextWindow.CursorLeft = 40
TextWindow.CursorTop = 0
TextWindow.Write(word)
tcl = TextWindow.CursorLeft
n = 1

While tcl 'bigger or equal' 0
'If TextWindow.CursorLeft - (2*n)*wl = 0 Then
TextWindow.CursorTop = TextWindow.CursorTop+1
TextWindow.CursorLeft = TextWindow.CursorLeft - (2*n)


For j = 0 To 2*n
If Math.Remainder(j,2) = 0 Then
TextWindow.Write("1")
Else
TextWindow.Write("0")
EndIf
'TextWindow.Write("j: " + j)
EndFor

program.Delay(1000)
'EndIf
tcl = TextWindow.CursorLeft - (2*n)
n = n + 1


EndWhile




Other Videos By Computertechlighthouse


2022-03-27How to solve problem VCRUNTIME140_1.dll missing
2022-03-27How to solve api-ms-win-crt-runtime-I1-1-0.dll problem on Windows 8.
2022-03-27How to create math PRIME function on Google SpreadSheet
2022-03-21How to import text or CSV file to google spreadsheet
2022-03-21How to import text file to google spreadsheet
2022-03-10How to erase Windows old installation files (Windows.old) on Windows 8.1
2022-03-06How to refill Epson L220 Printer
2022-02-20Rusia and Ukraina and End Times
2022-02-20Live Stream Totz Freelance
2021-11-14SMALL BASIC: How to make program that lists all the folder and subfolders of a defined path
2021-11-13SMALL Basic: Printing Binary Mountain pattern
2021-11-06How to derives sequence formula: 1,1,0,0,1,1,0,0,1,1.. and 1,1,1,0,0,0,1,1,1,...,...
2021-10-30How to referencing cell in OpenOffice Calc
2021-10-29How to generate arithmatic, geometric, and exponential sequences using Openoffice calc
2021-10-29SMALL BASIC: How to create simple encryption and decryption program
2021-10-29How to use conditional formatting on OpenOffice: Change cell's background color, etc.
2021-10-27How to make AND and OR function using IF function on OpenOffice Calc
2021-10-26SMALL BASIC: AND operation calculator
2021-10-03How to solve linear equation (3 equations with 3 variables) with OpenOffice Calc
2021-10-02How to generate 3 linear equations with 3 variables using OpenOffice Calc
2021-09-13Why Telnet traffic isn't secure (Capturing local Telnet traffic using Wireshark)



Tags:
Binary moutain
Printing alternating 0 and 1
Small Basic
Textwindow.cursorleft
Textwindow.cursortop