1. Design pseudocode for a program that will permit a user to store exactly 75 numbers in an array. Create an array big enough to hold the numbers and store each number in the array as it's entered. Be sure to PROMPT the user for each number before it's entered. You do not need to initialize the array. HINTS: Make sure you use a named constant when you declare the array (the number inside the brackets should be a named constant that you declared before the array declaration.) Use a for loop (or while loop if you'd like) to get each number from the user. The module has an example of pseudocode very similar to this problem. You're free to use this pseudocode as you create your program. 2. Identify three advantages of arrays. For each advantage, write at least one complete sentence explaining why the advantage you listed is an advantage. More detail is better. You may use outside resources but be sure to CITE those resources using APA format.

Respuesta :

Answer:

Question 1: The pseudocode is as follows:

int n = 70;

   int intArray[n];

   for(int i = 0; i< n; i++){

       print("Input "+(i+1)+": ")

       input intArray[i];

   }

Question 2: Advantages of array

  • Indexing in arrays in easy
  • It can be used to store multiple values of the same type
  • It can be used for 2 dimensional inputs

Explanation:

Question 1

This declares and initializes the length of the array

int n = 70;

This declares the array

   int intArray[n];

This iterates through the length of the array

   for(int i = 0; i< n; i++){

This prompts the user for inputs

       print("Input "+(i+1)+": ")

This gets input for each element of the array

       input intArray[i];

   }

Question 2

Indexing: Elements of the array can easily be accessed through the index of the element.

For instance, an element at index 2 of array intArray can be accessed using: intArray[2]

Multiple Values: This is illustrated in question 1 above where we used 1 array to collect input for 70 values.

2 dimensional inputs: Literally, this means that array can be used to represent matrices (that has rows and columns).

An illustration is:

intArray[2][2] = {[0,1],[3,5]}

The above array has 2 rows, 2 columns and 4 elements in total.