Given an array of double
values named prices
and a nonnegative int
variable n
,
print the first n
elements in prices
, each on their own line.
If n
is greater than the length of the array, print all the elements of the array.
If n
is 0
, you should print nothing.
Stuck? You may find these lessons helpful: