How would you be able to use a 2D array in a real-world situation?
What does len(string) do?
How would you be able to print an array to make a string, assuming the array was a char array?
Beginning with an initially empty array A, what is the positive
difference between the maximum and minimum non-zero values in the
array after the program is run?
for n = 1 to 4
for p = 1 to 4
a(n,p) = n + p + n*p
next p
next n
for n = 1 to 4
for p = 1 to 4
if (a(n,p) / 2 = int(a(n,p) / 2)) || (a(n,p) / 3 = int(a(n,p) / 3)) ||
(a(n,p) / 5 = int(a(n,p) / 5)) then a(n,p) = 0
next p
next n
end
From Junior Contest 3 2017-2018
5.
From Junior Contest 1 2015-2016
Take for example a chess board, with a 8 by 8 2D array.
len(string) is for finding the length of strings
loop through every position of the array and print it out
12
34