My code is as follows:For the description of this program, I have wrote:Mach 3 Grouper - Patrick Connor
Purpose: To generate a list of numbers ranging from 1 to the users input, in a random order.
Input: A - Upper bound of numbers generated.
Output: L5 - List containing the numbers in a random order
Requirements:
- Must be written in pure BASIC - no ASM allowed!
- Can only use up to 3 variables. (Real/Complex)
Note: I only used 2.
- Can only use up to 2 lists.
Speed is a greater priority over program size.
Example: If A=5, then the output in a list might be {4,1,5,3,2} or possibly {2,5,4,1,3}.
Code: Select all
seq(A,A,1,A->L6
{0->L5
For(A,1,A
randInt(1,dim(L6->B
L6(B->L5(A
L6(dim(L6->L6(B
dim(L6)-1->dim(L6
End