SMALL BASIC: AND operation calculator

SMALL BASIC: AND operation calculator

Subscribers:
613
Published on ● Video Link: https://www.youtube.com/watch?v=7GuL8IgLemU



Duration: 3:49
20 views
0


Hello this is the 1st code:
up:
TextWindow.WriteLine("Welcome to AND operation calculator")
TextWindow.WriteLine("===================================")

TextWindow.WriteLine("Enter the the first or A's variable value (0/1): ")
A = TextWindow.ReadNumber()
TextWindow.WriteLine("Enter the second or B's variable value (0/1): ")
B = TextWindow.ReadNumber()

If A = 0 And B = 0 Then
answer = 0
ElseIf A = 0 and B = 1 then
answer = 0
elseif A = 1 and B = 0 then
answer = 0
elseif A = 1 and B = 1 then
answer = 1
EndIf

TextWindow.WriteLine("The result is: " + answer)
TextWindow.WriteLine("========================= Again?")

TextWindow.WriteLine("")
TextWindow.Read()
Goto up

And, this is the 2nd code (more condensed if statement):
up:
TextWindow.WriteLine("Welcome to AND operation calculator")
TextWindow.WriteLine("===================================")

TextWindow.WriteLine("Enter the the first or A's variable value (0/1): ")
A = TextWindow.ReadNumber()
TextWindow.WriteLine("Enter the second or B's variable value (0/1): ")
B = TextWindow.ReadNumber()

If A = 1 And B = 1 Then
answer = 1
Else
answer = 0
EndIf


TextWindow.WriteLine("The result is: " + answer)
TextWindow.WriteLine("========================= Again?")

TextWindow.WriteLine("")
TextWindow.Read()
Goto up




Other Videos By Computertechlighthouse


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)
2021-09-12How to solve EOL Ubuntu's unable to install or update packages: error 404
2021-09-11How to play flash file in 2021
2021-09-09How to pause and unpause OBS recording and set their shortcuts
2021-09-09Installing Windows XP SP 3 in 2021 using VMware player 12
2021-09-08How to fix ADB interface driver error on your computer manually
2021-09-07How to remote controlling android phone from PC using scrcpy
2021-09-07How to change network category from public to private on Windows 8.1



Tags:
AND truth table
AND operation calculator
Boolean
Small Basic