Pre-Defined Functions
3
Standard Algorithms
3
Pre-Defined Functions
Random
num = Rnd() * 10
Generates random number between 0 and 10
Pre-Defined Functions
Round
num = math.round(3.14, 1)
Rounds number to 1 decimal place
Pre-Defined Functions
Length
Num = len(name)
Value becomes number of letters in name variable
Standard Algorithms
Input Validation
Do while num > 10
MsgBox(“Error, the number you enter should be equal to or less than 10.)
num = InputBox(“Please enter a number”)
Loop
Standard Algorithms
Running Total
Total = 0
For counter = 1 to 3
Num = InputBox(“Please enter a number)
Total = Total + Num
Next
Standard Algorithms
Traversing an Array
For counter = 0 to 3
MsgBox(array(counter))
Next