
-----------------------------------
rty1001
Tue Sep 12, 2017 12:18 pm

I'm having trouble understanding the meaning behind each individual command
-----------------------------------
What is it you are trying to achieve?
An understanding of this code.


What is the problem you are having?
Understanding this code.


Describe what you have tried to solve this problem
N/A


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
var numbers : array 1 .. 100 of int
var x : int
var writeFile : int
var readFile : int
open : writeFile, "data.txt", put



for i : 1 .. 100
    randint (x, 1, 10)
    put x
    put : writeFile, x
end for

close : writeFile
open : readFile, "data.txt", get

for j : 1 .. 100
    get : readFile, numbers (j)
end for

/* put "Please enter a positive number to continue"
 put "Please enter a negative number to quit"
 var response: int

 loop
 get response
 put if response 