Hi, I'm new to this so not sure if I'm posting this in the right place. I'm in my first semester of college and I'm taking an IT elective: Software Design. It doesn't involve any special programming language, it's simple, basic object-oriented design class. We were just introduced to the usage of ARRAYS, and recieved a few practice problems to work on.
I did one of them, so if anyone could please look it over to see if I'm on the right track and then I have a few on which similar examples may be helpful to follow.
PROBLEM #1:
You have already created an array named NUMBERS with 20cells. You are to initialize all of the cells with odd subscripts to 1 and all of the cells with even subscripts to 2.
MY TAKE ON IT:
I <-- 1
DOWHILE I<= 20
NUMBERS (I) <-- 1
I <--- I + 1
NUMBERS (I) <--- 2
I <--- I+ 1
ENNDO
PROBLEM #2:
You are to read 10 numbers from a data file into an array named List. Create another 10 element array named Reverse that is to contain the same items as List but in reverse order. For example, the first element in List will be placed in the last position of Reverse, the second element in List will be placed in the second-to-last position in Reverse, etc. After Reverse has been created, output the contents of both arrays.
EXAMPLE GIVEN in class notes:
I<--10
DOWHILE I>= 1
Write Numbers (1)
I<-- I -1
ENDDO
PROBLEM #3
You have created three arrays:
array A of size 100
array B of size 50
array C of size 200
You are to store the first 100 numbers (1,2,3,...,100) into array A, the first 50 positive odd numbers (1,3,5,...,) into array B, and the reciprocal of each position [C(5) = 1/5] into array C. Then, output each array.
I'm guessing where I'm stuck is how to deal with multiple arrays because of the quick examples I was given in class deal with only one array each time. So if anyone could please help me with this ARRAY concept, it would be very helpful because the semester is coming to an end and I can't afford to not understand this. Any help will be appreciated it, I have a bunch of other practice problems but not very relevant examples to follow. By the way this isn't for any grade, it's for my own practice before the final so please don't assume I'm trying to get answers without doing any work. I really dont understand the concept, and am only seeking help to be able to do the practice problems to prepare for the final exam. Thank you in advance.