Question: #include #include #include using namespace std; int main() { int numValues; unsigned int i; vector valsList; cin >> numValues; valsList.resize(numValues); /* Your code goes here
#include
int main() { int numValues; unsigned int i; vector
/* Your code goes here */ // you can only edit code at here cout

Integer numValues is read from input. Then numValues integers are read and stored in vector valsList. Perform the following tasks: - Read the first element of valsList. - Read the second element of valsList. - Assign each subsequent element of valsList with the sum of the two previous elements. Ex: If the input is 43.020.0, then the output is: Sequence: 3.0 20.0 23.0 43.0 1 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
