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
klasskru [66]
3 years ago
15

IN C++ PLEASE!!! Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector

. Then, output all values in the vector that are greater than zero in reverse order, each on a new line.
Ex: If the input is -19 34 -54 65 -1, the output is:

65
34

#include
#include
using namespace std;

int main() {

/* Your solution goes here */

return 0;
}
Computers and Technology
1 answer:
ololo11 [35]3 years ago
6 0
#include
#include
using namespace std;

int main(){

int input[] = {-19, 34, -54, 65, -1};
std::vector voutput:
std::vector vinput (input, input + sizeof(input) / sizeof(int) );

for (std::vector::iterator it = vinput.begin(); it != vinput.end(); ++it)
if(*it > 0) voutput.insert(voutput.begin(), *it);
for(std::vector::iterator it = voutput.begin(); it < voutput.end(); ++it)
std::cout << *it << ‘\n’ ;

return 0;
}
You might be interested in
What is the point of having bullets points in a text box
Ludmilka [50]
You should have bullets in a text box in case you have a list of stuff. For example:

Computer Parts

.Tower

.Monitor

. Mouse

.Printer


3 0
4 years ago
Using the _______ list, you can select the number of photos that will appear on each slide.
Softa [21]

i think its D but i am not exactly sure


8 0
3 years ago
Read 2 more answers
Data that are collected on large populations of individuals and stored in databases are referred to as _____.
xz_007 [3.2K]
The answer is statistics
4 0
3 years ago
Java:
Agata [3.3K]

Answer:

import java.util.*;

public class work {

// function for counting unique character

public static int numUnique(String input) {

boolean[] list = new boolean[Character.MAX_VALUE];

for (int i = 0; i < input.length(); i++) {

list[input.charAt(i)] = true;

}

int count = 0;

for (int i = 0; i <list.length; i++) {

if (list[i] == true){

count++;

}

}

return count;

}

public static void main(String args[])

{

List<String>list=new ArrayList<>(); // creatng array list of type string

list.add("abcdef");

list.add("aaabcd");

list.add("bccddee");

list.add("abcddd");

list.add("a");

for(String str:list)

{

// for printing the results

System.out.println("given string : "+ str+" , number of unique values :"+numUnique(str));

}

}

}

Explanation:

5 0
4 years ago
Pros and cons of toyota's organizational structure?
GarryVolchara [31]
In 2013, Toyota changed its organizational structure from the centralized structure to: 
- the Global hierarchy, 
- the Geographic divisions, and 
- the Product-based divisions. 

This change was made to adapt the consumer's demand in each of the regional markets all over the world. The most important element of this structure is the speed of handling issues and problems of all Toyota's branches. However, this structure also has a weakness which is the decreasing of headquarter's control over the global organization.
4 0
4 years ago
Other questions:
  • Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from great
    8·1 answer
  • "the most common way to access the internet is through ________."
    5·1 answer
  • Some touch screens recognize when you touch the screen with two fingers or two hands. If you are looking for a device on which y
    11·1 answer
  • 50 pts. please help ! Explain briefly the role, responsibilities, and required background of the production designer of a film.
    12·1 answer
  • What describes an agreement between two or more parties and demonstrates a "convergence of will" between the parties so that the
    10·1 answer
  • Which is true of effective passwords?
    5·1 answer
  • Please answer<br><br>NO LINKS​
    7·1 answer
  • Google Slides is most similar to which of the following programs?
    10·2 answers
  • Can somebody please help me with these few questions?
    11·1 answer
  • State two differences between a mouse pointer and a mouse cursor​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!