Assignment 4: The purpose of this program is to implement a simple array, and in so doing, to use the appropriate address calculations..
Input: The user enters two lists of non-negative integers. The first list is just data - data in the array. The second list represents a list of queries, each specifying an index into the data array (the first list), starting with index 0.
Output: The program must give back the query results, i.e. the
values in the data array associated with each index of the second list.
Odds and ends:
1. limit the data array to 20 values max (all non-negative)
2. ffffffff will be the delimiter between the lists
3. appropriate error messages should be given for error conditions, such as too many values, invalid index, etc.
4. input hex values using 'ta 4' and 'ta 5'
Example "session":
input: 0 5 10 15 20 ffffffff 4 1 2 2 0
output: 20 5 10 10 0
|