1d array

  1. Declare an integer variable called "size" to store the size of the array.
  2. Ask the user to input the size of the array.
  3. Declare an integer array with the size obtained from the user input.
  4. Use a for loop to iterate through each element of the array.
  5. Ask the user to input the value for each element of the array.
  6. Store the user input in the respective element of the array.
  7. Use another for loop to iterate through each element of the array.
  8. Print the value of each element of the array to the console.