202k views
3 votes
Write the definition of a function printarray, which has two parameters . the first parameter is an array of integers and the second is an int , the number of elements in the array . the function does not return a value . the function prints out each element of the array , on a line by itself, in the order the elements appear in the array , and does not print anything else.

1 Answer

4 votes
Using pseudocode:

printArray(arr[], integers)
DECLARE integers
integers = SizeOf(arr)
FOR i = 1 to integers // loop from 1 to the number of elements in arr[]
print(i)
print('')
i = i + 1
ENDFOR
END
User Shaneza
by
8.3k points