Question
Fill this for me please. #include #include using namespace std; // You can use magic numbers on the quiz. int main() { // DO_02: Declare
Fill this for me please.
#include
// You can use magic numbers on the quiz.
int main() { // DO_02: Declare an array myArray of type float of 50 elements.
// DO_03: Input a number into the first element of myArray.
// DO_04: Input a number into the last element of myArray.
// DO_05: Complete the following statements to display // the first and the last element of myArray. End each // statement with an endl. cout << "The first array element is " cout << "The last array element is " cout << endl;
// DO_06: Assign the sum of the two elements above to the // second element of myArray.
// DO_07: Complete the following statements to display // the second element of myArray. cout << "The second array element is " cout << endl;
// DO_08: Use a for loop to input values to the first 30 elements // of myArray, overwriting the values read earlier.
// DO_9 Double the second array element of myArray and overwrite the // previous value.
// DO_10: Subtract 1 from the first array element of myArray and // overwrite the previous value.
// DO_11: Use a for loop to compute the largest value of the first // 15 elements of myArray and store the result in max. float max;
cout << "The largest value of the first 15 elements is " << max << '.' << endl;;
return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started