Hi I want this question answered in c++ language and It must be in basic languag
ID: 3708908 • Letter: H
Question
Hi I want this question answered in c++ language and It must be in basic language or whatever the easier way for the problem
const int SIZE = 10;
int[SIZE] nums = {5,4,2,7,6,8,5,2,8,14};
Write code to perform the following 5 array operations (Note that the number of clues vary, just because a [____] is not explicitly written in does not mean there should not be brackets).
//#1 Square each number ((i.e., multiply each by itself)
for (int i ___; i < _____; i++)
{
____[i] = ______*_____;
}
//#2 Add a random number between zero and 10 to
// each number.
_________________________________
_____ += ________;
//#3 Add to each number the number that follows in the
// array. Skip the last value in the array.
for (int i = 0; i < _____; i++)
{
_____ += ______[____];
}
//#4 Calculate the sum of all the numbers.
_____ ________ = ____;
for (int i = 0; i < SIZE; i++)
{
______ += ________;
}
//#5 Display the largest number in the array
//You’re on your own here!
Explanation / Answer
const int SIZE = 10; int[SIZE] nums = {5,4,2,7,6,8,5,2,8,14}; //#1 Square each number ((i.e., multiply each by itself) for (int i = 0; iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.