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]
3 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]3 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
study the picture of the simulation and the graph above. based on the information obtained from your study of the simulation and
andreyandreev [35.5K]
This is how you know i’m def gonna fail my university class this year :/
6 0
3 years ago
Where does append add the new elements?
ZanzabumX [31]

Answer:

"Option 1: To the end of an array." is the correct answer.

Explanation:

The word "Append" means adding to the end of a document.

Appending means whatever new content is added, it is added at the end of the document or data structure.

Similarly,

Appending an array means adding new elements to the end of the array.

Hence,

"Option 1: To the end of an array." is the correct answer.

7 0
3 years ago
A time management tool in a help desk software package probably has the greatest impact on the productivity of _____.
777dan777 [17]

A time management tool in a help desk software package probably has the greatest impact on the productivity of help desk agent.

<h3>What is  help desk software ?</h3>

IT and customer service teams utilize help desk software to assist staff members and customers. Its primary purposes include assisting service teams in methodically managing support requests, offering alternatives for self-service, monitoring and reporting performance, and ideally doing much more.

The objectives and procedures of a help desk when employed by an IT team are established using industry and governmental best practices, such as ITIL (Information Technology Infrastructure Library). The aim of ITIL while handling problems, according to Mikkel Shane, CEO of Zendesk,  is to "establish regular service operation as rapidly as possible and minimize the adverse effect on business operations.”

Simply put, help desk support software is made to provide you with the means of helping your clients feel heard. Here is a little explanation of how it operates:

To know more about help desk software :

brainly.com/question/24171638

#SPJ4

3 0
1 year ago
Apakah maksud input dan output ?<br>​
Nana76 [90]

INPUT ADALAH KOMPONEN PIRANTI KERAS YANG MEMUNGKINKAN USER ATAU PENGGUNA MEMASUKKAN DATE KE DALAM KOMPUTER ATAU BISA JUGA DISEBUT SEBAGAI OUTPUT ADALAH DATA YANG TELAH DIPROSES MENJADI BENTUK YANG DAPAT DIGUNAKAN!

4 0
3 years ago
Why is successful pattern recognition important for computer programmers?
NISA [10]
Pattern recognition is a branch of machine learning that focuses on the recognition of patterns and regularities in data, although it is in some cases considered to be nearly synonymous with machine learning.
7 0
3 years ago
Other questions:
  • Write the UPDATE command to increase the commission (column name :COMM) by 500 of all the salesman who have achieved sales (Colu
    15·1 answer
  • These are questions from my Computer/Customer Support Class
    6·1 answer
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • The ___________________ Act makes it illegal to deactivate or otherwise disable any antipiracy technologies including DRM techno
    7·1 answer
  • How is a cell named in microsoft excel 2016
    10·1 answer
  • Write an assembly language program with a loop and indexed addressing that calculates the sum of all the gaps between successive
    11·1 answer
  • What is the main purpose of cutting plane line arrows?
    7·1 answer
  • When referring to hard drives, access time is measured in
    11·1 answer
  • Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
    13·1 answer
  • Which factor is NOT used to determine who can be let go during a downsizing?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!