Write C++ statements to do the following: a. Declare an array to hold 10 double values. b.
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Posted Date: