Question: Write a program to declare an array of integers, size 1 0 ( 5 pt ) , then add the following elements into the array:

Write a program to declare an array of integers, size 10(5pt), then add the following elements into the array:
a)1 as the first element of the array (5 pt)
b)10 as the last element of the array (5 pt)
c) all other elements of the array should be initialized with random values between 1 and 6(10 pt)
d) print all elements of the array (5 pt)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!