1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
astraxan [27]
2 years ago
6

Resize vector countDown to have newSize elements. Populate the vector with integers {newSize, newSize - 1, ..., 1}. Ex: If newSi

ze = 3, then countDown = {3, 2, 1}, and the sample program outputs:
#include
#include
using namespace std;
int main() {
vector countDown(0);
int newSize = 0;
int i = 0;
newSize = 3;
STUDENT CODE
for (i = 0; i < newSize; ++i) {
cout << countDown.at(i) << " ";
}
cout << "Go!" << endl;
return 0;
}
Computers and Technology
1 answer:
strojnjashka [21]2 years ago
4 0

Answer:

Following are the code to the given question:

#include <iostream>//defining header file

#include <vector>//defining header file

#include <numeric>//defining header file

using namespace std;

int main()//main method

{

vector<int> countDown(0);//defing an integer array variable countDown

int newSize = 0;//defing an integer variable newSize that holds a value 0

int i = 0;//defing an integer variable i that initialize with 0

newSize = 3;// //use newSize to hold a value

countDown.resize(newSize,0);// calling the resize method that accepts two parameters

for (i = 0; i < newSize; ++i)//defining a loop that reverse the integer value

{

countDown[i] = newSize -i;//reverse the value and store it into countDown array

cout << countDown.at(i) << " ";//print reverse array value

}

cout << "Go!" << endl;//print message

return 0;

}

Output:

3 2 1 Go!

Explanation:

In the given code inside the main method an integer array "countDown" and two integer variables "newSize and i" is declared that initializes a value that is 0.

In the next step, an array is used that calls the resize method that accepts two parameters, and define a for a loop.

In this loop, the array is used to reverse the value and print its value with the message.

You might be interested in
In 3–5 sentences, describe the unique challenges e-mail presents for business communications.
alina1380 [7]
One of the things that are a challenge, is that you have to get the correct puntuation, correct capitilization, because it's a buisness email. You ont want to mess a buisness email up. You also have to have no repating phrases and sentences. You can't be adding random words and saying "and" all the time. 
7 0
3 years ago
Read 2 more answers
Any one know how to fix forzas camera bc it shutters to much
igomit [66]

Answer:

LEDs are powered by alternating current AC.

Explanation:

The electricity will move in and out of cycles.

When the FPS won't math it'll flicker. Try switching to your camera's shutter speed instead. ( May be times your camera won't support it.)

6 0
2 years ago
An employee sets up an automation that transfers files in a specific folder on their PC to a remote drive for archiving, provide
Yuri [45]

Answer:

Rule based automation

Explanation:

8 0
2 years ago
ENG103 DISCUSSION BOARD 6
amm1812
The proper citation for your course of study -computer related- is APA (American Psychological Association)  format. This citation format allows us to state the publication date, title , and authors in an organized and short fashion. All scholarly reports that are technology or psychology based, should be cited in APA format. 

<span>I know this because it is the format I use for all of my college courses which are all Computer/Technology related. </span>
3 0
3 years ago
____ lets you store your data remotely and access it with any device connected to the internet.
Gre4nikov [31]
Either iCloud or air drop
6 0
3 years ago
Other questions:
  • Where is the error in this code sequence?
    11·1 answer
  • Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
    6·1 answer
  • What are some good editing software apps for pc?
    11·1 answer
  • A hub transmits all incoming messages to all of its ports except the port where the messages came in. A switch usually sends mes
    14·2 answers
  • Eight what makes one character
    14·1 answer
  • According to the video, some workers who work for themselves, such as Actors, Musicians, or Writers, may have what sort of worke
    7·1 answer
  • Windows stores information from the Credential Manager application in secure folders called
    5·1 answer
  • Which feature allows users to see all suggestions for edits to a document at once?
    7·2 answers
  • ____ occurs when two nodes simultaneously check a channel, determine that it is free, and begin to transmit.
    9·1 answer
  • After you configure backup settings using the backup plugin, backup jobs will run automatically and start taking backups at the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!