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
lana [24]
2 years ago
11

Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector. Then, output al

l values in the vector (except the last value) with the last value in the vector subtracted from each value. Output each value on a new line. Ex: If the input is -46 66 76 9 -1, the output is:
-55
57
67
Computers and Technology
1 answer:
weqwewe [10]2 years ago
6 0

Answer:

The program in C++ is as follows:

#include <iostream>

#include <vector>

using namespace std;

int main(){

vector<int> nums;

int num;

cin>>num;

while(num != -1){

 nums.push_back(num);

 cin>>num; }  

for (auto i = nums.begin(); i != nums.end(); ++i){

    cout << *i <<endl; }

return 0;

}

Explanation:

This declares the vector

vector<int> nums;

This declares an integer variable for each input

int num;

This gets the first input

cin>>num;

This loop is repeated until user enters -1

while(num != -1){

Saves user input into the vector

 nums.push_back(num);

Get another input from the user

 cin>>num; }

The following iteration print the vector elements

<em> for (auto i = nums.begin(); i != nums.end(); ++i){ </em>

<em>     cout << *i <<endl; } </em>

You might be interested in
_______ integrates all departments and functions throughout an organization into a single IT system (or integrated set of IT sys
aleksklad [387]

Answer:

ERP ( Enterprise Resource Planning )

Explanation:

ERP mainly stands for enterprise resource planning. ERP is system software which is a combination of many application which works together to automate a business process.  

It is a business management software which reduces the wastage of time by making tasks simpler like when we talk about accounting and stock in a company, it takes very much time when maintaining by humans but when it comes to ERP software, it only takes a while to give you detailed information about everything. It automates the manual process of a company and gives speed to the growth of the company.

3 0
2 years ago
Talon is a new game designer working on an exciting and innovative game idea, but its time to examine the idea for technical fea
GarryVolchara [31]

Answer:

I think the answer is C.

Explanation:

4 0
2 years ago
Read 2 more answers
List 7 basic internal component found in a computer tower?
NISA [10]
7 Basic Internal Component found in a computer tower:

1) Power Supply
2) Central Processing Unit (CPU)
3) Hard Disk Drive (HDD)
4) Motherboard
5) Video card
6) Random Access Memory (RAM)
7) Sound Card

*Expansion Card, Network Card, Bluetooth Card
3 0
3 years ago
Read 2 more answers
ANSWER QUICKLIY
lidiya [134]

Answer:

Explanation:

Allow you to view the document in different ways. Sorry if I am wrong. I am dumb

God bless, stay safe, and good luck! :)

4 0
2 years ago
Read 2 more answers
The IT director instructed the systems administrator to build a server to support the accounting department's file growth. The I
Mamont248 [21]

Answer:

Option (C) FAT32 File System Type

Explanation:

  • FAT32 File System Type cannot be encrypted by the accounting users.
  • FAT stands for File Allocation Table. It is a file system architecture.
  • The File Allocation Table is an index table which contains the details about each cluster ( disk storage space ).
  • By traversing the File Allocation Table, the operating system gets the details the file ( where it is located ) and the size of the file.
  • The FAT32 file system contains more number of possible clusters.
  • In this system, 32 bits are used to store the total number of possible clusters.
  • In FAT32 file system, the transparent encryption is not supported.
  • So, option (C) is correct.
  • All other options are wrong options.
3 0
3 years ago
Other questions:
  • What is <br> Warehouse schema.
    14·1 answer
  • Adjusting the ______ adjusts the difference in appearance between light and dark areas of the photo.​
    10·2 answers
  • Is a network where connected devices are located within the same building.
    5·2 answers
  • Which method do software testers use to isolate new code from the rest of the network during the test stage of the software deve
    15·1 answer
  • Kelvin owns a small trading firm. Recently, he suspected that some of his employees were using fraudulent activities for their p
    5·2 answers
  • How to measure potential energy of a ball?
    14·1 answer
  • Suppose I create a new kind of Java object, called "Kangaroo". Further suppose that at any given time, all instances of this new
    6·1 answer
  • Which of the following is as result of division of Labour​
    5·1 answer
  • Find the unknown quantities
    12·1 answer
  • What is wrong with the following code? publicstatic char grade(int score) { if (score &gt;= 9) { return 'A'; } else if (score &g
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!