Answer:
The code to this question can be given as:
Code:
int lastVector = newScores.size() -1; //define variable lastVector that holds updated size of newScores.
newScores = oldScores; //holds value.
for (i = 0; i < SCORES_SIZE - 1; i++) //define loop.
{
newScores.at(i) = newScores.at(i+1); //holds value in newScores.
}
newScores.at(lastVector) = oldScores.at(0); //moving first element in last.
Explanation:
- In the given C++ program there are two vector array is defined that are "oldScores and newScores". The oldScores array holds elements that are "10, 20, 30, 40".
- In the above code, we remove the array element at first position and add it to the last position. To this process, an integer variable "lastVector" is defined.
- This variable holds the size of the newScores variable and uses and assigns all vector array elements from oldScores to newScores. In the loop, we use the at function the removes element form first position and add in the last position.
- Then we use another for loop for print newScores array elements.
A word processor is a computer program or device that provides for input, editing, formatting and output of text, often with additional features.
The program is an illustration of built-in functions
<h3>What are
built-in functions?</h3>
They are named program statements that have a predefined purpose
<h3>The actual program</h3>
The program written in C++, where comments are used where required is as follows:
#include <iostream>
#include <cmath>
#include <ios>
#include <iomanip>
using namespace std;
int main (){
double x;
double y;
double z;
cin>>x;
cin>>y;
//This calculates the given expression
z = pow(sqrt(y),x);
cout << fixed<<setprecision(2);
cout<<z<<endl;
return 0;
}
Read more about python functions at:
brainly.com/question/14284563
37 most likely.
No programming language is specified, and you didn't put what the function is, so assuming it's already implemented, MAX should display the highest number.