Professional Documents
Culture Documents
C = 5
loop while C < 20
output "Three blind mice"
C = C*2
end loop
// === Money =================
//
// This program converts money from EUROS into
// several other currencies. Then it uses IF commands
// to make some decisions.
EUROS = 50.00
POUNDS = 0.8*EUROS
YEN = EUROS * 90
A = 28
B = 42
input ENGLISH
input START_HOURS
input START_MINUTES
input END_HOURS
input END_MINUTES
input MONTH
input DAY
input YEAR
M = MONTH
D = DAY
MAX = 10
SUM = 0
ID = [1001,1002,1050,1100,1120,1180,1200,1400]
NAME =
["Apple","Cherry","Peach","Banana","Fig","Grape","Olive","Mango"]
input TARGET
LOW = 0
HIGH = 7
FOUND = -1
NAMES = ["Robert","Boris","Brad","George","David"]
DATA = [17,20,23,29,33,42,60,61,75,75,90,99]
FREQS = [0,0,0,0,0,0,0,0,0,0]
output "Data"
SOCCER = ["Al","Bobby","Carla","Dave","Ellen"]
BBALL = ["Lou","Dave","Hellen","Alan","Bobbie"]
CITIES = ["Athens","Berlin","Dallas","Denver","London","New
York","Rome"]
COUNT = 0
method firstLetter(s)
return s.substring(0,1)
end method
//==== Cities Collection =========================
// This shows how to add names of students into
// a Collection, and then search the collection and
// print all the student names that begin with "D".
// It includes a METHOD that returns
// the first letter of a String.
NAMES.add("Bob")
NAMES.add("Dave")
NAMES.add("Betty")
NAMES.add("Kim")
NAMES.add("Debbie")
NAMES.add("Lucy")
NAMES.resetNext()
method firstLetter(s)
return s.substring(0,1)
end method