Question: Write C++ statements to do the following: a. Declare an array to hold 10 double values. b. Assign value 5.5 to the last element in
Write C++ statements to do the following:
a. Declare an array to hold 10 double values.
b. Assign value 5.5 to the last element in the array.
c. Display the sum of the first two elements.
d. Write a loop that computes the sum of all elements in the array.
e. Write a loop that finds the minimum element in the array.
f. Randomly generate an index and display the element at this index in the array.
g. Use an array initializer to declare another array with initial values 3.5, 5.5, 4.52, and 5.6.
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
Here are C statements to perform the requested actions a Declare an array to hold 10 double values c... View full answer
Get step-by-step solutions from verified subject matter experts
