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
Akimi4 [234]
4 years ago
15

Write a c ++ program that reads unknown number of integers from the user and stores them into a vector. The user will indicate t

he end of numbers by entering a 0. The program should then print out these numbers in reverse order.
Computers and Technology
1 answer:
SVETLANKA909090 [29]4 years ago
4 0

Answer:

#include <iostream>

#include <vector>

using namespace std;

int main() {

vector<int> numberlist;

int number;

while (1) {

 cout << "Enter a number: ";

 cin >> number;

 if (number == 0) break;

 numberlist.push_back(number);

};

reverse(numberlist.begin(), numberlist.end());

for (int number : numberlist) {

 cout << number << " ";

}

return 0;

}

Explanation:

There is a built-in function to reverse the contents of a vector.

You might be interested in
Im having trouble with PLC subject. How to make this ladder diagram?
ozzi
Did you try google? Probably it will help u
6 0
3 years ago
MRS. PAPPAS CP ALG - PERIOD 8<br>My assignments<br>Active<br>FA<br>Past<br>ALL UPCOMING<br>Sensor​
Nat2105 [25]

Answer:

This is a daily schedule for any teacher. It seems he/she wants to enter the details on any calendar.

Explanation:

It seems that XYZ who is a teacher has prepared a schedule for him/her for someday. It is quite confirmed that She/he takes 7 periods. And these are the details of what he/she be doing in each of them. And once he/she gets the Google Calendar ready, he/she will be alerted through a beep or a buzzing sound after each task is accomplished.

5 0
3 years ago
Discuss different ways to respond to errors, such as notifying the user onscreen, writing to an error log, notifying the develop
Ronch [10]

Answer:

Notifying the errors is always useful .

Explanation:

The errors should always be notified to the developer. It is useful and is important. When we provide notifications on the screen, it helps the user and it can be used to provide feedback. In regard to developmental work, it has to be important and confidential and we use the help of email to inform or notify errors to the organization. This will help the company from negative criticism and helps the company perform better. We can also write an error log when we face the same error again and again even after notifying the developer organization. This helps to put a reminder to the organization that immediate check has to be dome and eliminate the error from the source.

Some disadvantages are if we do not keep timer implementation, the alert keeps on popping on the screen, which is irritable.

4 0
3 years ago
Develop a multithreaded app that can find the integer in the range 1 to 10000 that has the largest number of divisors. It should
skelet666 [1.2K]

Answer:

its not letting me Write out the code so here are screenshots

Explanation:

5 0
4 years ago
You’ve received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before ex
Nina [5.8K]

Answer:

D. tar rvf data79.tar

4 0
3 years ago
Other questions:
  • What possible effects could cyber attack have on Johannesburg stock exchange
    6·1 answer
  • Assume you have a byte-addressable machine that uses 32-bit word (integers are 32-bit) and you are storing the following informa
    5·1 answer
  • A .jpg file is an example of which of the following file types
    15·2 answers
  • A(n _______________ is a pre-written formula that is built into excel
    12·1 answer
  • A Programmer uses what piece of software?*
    12·1 answer
  • Hey you know Python? Could you help me, please? It's for my Final please help me SOS.
    8·1 answer
  • How should you behave in an online academic environment?
    7·2 answers
  • You are evaluating three branch prediction strategies: (1) predict always taken, (2) predict always not taken and (3) use the 2-
    14·1 answer
  • Convert Octal 623, to Decimal number ​
    10·1 answer
  • an engineer is writing a web application that requires some user input. the engineer has put a submit button on their page and n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!