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