Write a Ruby program to create a new array of length 4 containing all their elements from two array of integers, length 2
def check_array(a, b) arr1 = a[0], a[1], b[0], b[1] return arr1; end print check_array([1, 3], [5, 4]),"\n" print check_array([11, 3], [5, 21])
Output:
[1, 3, 5, 4] [11, 3, 5, 21]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer