pseudocode Flashcards
1
Q
declare a variable
A
DECLARE variableName : DATATYPE
2
Q
declare a constant
A
whatever your data is, could be a number or a string (stored in quotations)
CONSTANT variableName = data
3
Q
declare a 1D array
A
DECLARE arrayName : ARRAY[lower:upper] OF DATATYPE
4
Q
declare a 2D array
A
DECLARE arrayName : ARRAY[lower1:upper1, lower2,upper2] OF DATATYPE
5
Q
assign individual array element
A
1D: arrayName[i] <- value
2D arrayName[i, j] <- value
6
Q
assign a value to a group in the array
A
FOR Index ← n TO m arrayName[Index] ← value NEXT Index
n and m are examples (integers), value is an example