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
snow_lady [41]
2 years ago
15

Write a loop that reads positive integers from console input, printing out those values that are even, separating them with spac

es, and that terminates when it reads an integer that is not positive. Declare any variables that are needed.
Computers and Technology
1 answer:
AfilCa [17]2 years ago
3 0

#include <iostream>

#include <vector>

std::vector<int> v;

int main(int argc, char* argv[]) {

   while(1) {

   int temp;

   std::cout << "\nEnter a number: ";std::cin>>temp;

   

   if(temp<0) {

       std::cout << "\nEven number(s) is/are:\n---------------------\n";

       for(int i=0;i<v.size();i++) {

           if(v.at(i)%2==0) std::cout << v[i] << " ";

           else continue;

       }

       std::cout << std::endl;

       break;

   }else {

       v.push_back(temp);

   }

}

   return 0;

}

You might be interested in
Your company has purchased another company that also uses Windows Server 2016 and Active Directory. Both companies need to be ab
Scorpion4ik [409]

Answer:

Create a two-way forest trust

Explanation:

The aim here is to ensure that both companies are able to access the forest resources of each other. The creation of a Two-way Forest Trust would guarantee that as if the Two-way Forest Trust is created between Forest A and Forest B, being the forest resources of the two companies respectively, then all the domains in Forest A will trust every domain in Forest B and vice versa.

5 0
3 years ago
(PLATO) How can hackers obtain a person’s data? Malicious hackers can obtain a person’s data through the method of simple ___ en
EastWind [94]

The missing word here is social.

Social engineering involves using simple human methods to steal data, such as looking through peoples’ drawers for pieces of paper on which they might have written down passwords, or perhaps sneaking a look at the keys you press while walking past your desk as you are typing your password. Such behaviors designed to steal your personal information are methods of social engineering.

Let me know if you have any questions.

5 0
3 years ago
The term used to describe the shape and layout of a computer component such as a motherboard or hard drive is __ factor?
Flauer [41]
FORM factor. Example are ATX, micro ATX, and many more. ATX and MATX are the most common next to servers as well
3 0
3 years ago
Please help ASAP, will mark brainliest!
sp2606 [1]

Answer:

Stick to concrete nouns

Explanation:

The best technique to improve the web search result is that search with the help of keywords. These keywords help in searching the required results from search engines.

The keywords are actually nouns. Noun is name of object, place or person. So by using nouns we can search out required results.

For example

If we want to search about some persons bibliography, we use his name in our search. His name is an example of noun.

3 0
3 years ago
"Common knowledge" must always be credited or else it is considered plagiarism?<br> True<br> Fales
igomit [66]
Hi!

It depends on how close you have paraphrased it. If your "common knowledge" is very closely related to the resource, it would be considered plagiarism.
3 0
3 years ago
Other questions:
  • A ____ is a prewritten formula that is built into excel.
    6·1 answer
  • Hardy doesn't have access to a work template, which is on the network server. What should he do?
    14·1 answer
  • Joaquin is considering a career as an animator and wants to know more about the daily work of an average animator. Which strateg
    11·1 answer
  • Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
    9·2 answers
  • At Chicago Cubs games, residents across the street from Wrigley Field can watch the game from their apartment windows. Many of t
    14·1 answer
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • Both instructions and data in a digital<br>computer are represented as binary<br>digits. True False​
    13·1 answer
  • Fill in the blanks, so the print statement displays the result of the function call in order.
    12·1 answer
  • What are 3 software programs for mobile computing?
    10·1 answer
  • Search the Web for three different employee hiring and termination policies. Review each and look carefully for inconsistencies.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!