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
Suppose you have one particular application that is trying to send data on the Internet but none of the data is making it to the
CaHeK987 [17]

Answer:

Firewall is blocking that application.

Explanation:

i got it right on the test and i hope yall have a great day :3

4 0
3 years ago
Read 2 more answers
An important goal of biosecurity training is to: Prevent laboratory accidents that could expose personnel to hazardous agents. P
Anestetic [448]

Answer:

Educate laboratory directors on their role in providing a safe working environment.

Explanation:

A lab is an abbreviation for laboratory and it can be defined as a building that is equipped with scientific equipments and apparatus, which are used for performing scientific experiments, manufacturing of chemicals and drugs, research, testing and analysis of hypothesis in order to establish a theory.

Generally, laboratory scientists, technicians, students and anyone going into a laboratory are expected to obey the rules and regulations guiding the laboratory.

Hence, an important goal of biosecurity training is to educate laboratory directors on their role in providing a safe working environment.

6 0
3 years ago
Select the correct answer. Larry finds it easy to run legacy programs and applications in a virtualized environment. How does th
muminat

The answer is B: installs and runs different versions of an operating system on the same computing device

Virtual machines are like guest operating systems or application environments that give you the perception that you are physically connected to a different box. A system virtual machine, for instance, copies all the components and processes of a real computer. It helps the user experiment with different operating systems and applications without the need to install them on your physical hardware.


8 0
3 years ago
Which option is an example of a Boolean operator?<br> O A. HTML<br> O B. <br> C. SEO<br> D. NOT
gayaneshka [121]

Answer:

D

Explanation:

Boolean Operators are simple words (AND, OR, NOT or AND NOT) used as conjunctions to combine or exclude keywords in a search, resulting in more focused and productive results. ... Proximity Operators (with, near and others) can also help you in searching. See Using Proximity Operators for more details and examples.

8 0
3 years ago
An application with which you can perform calculations on numbers and work with other data
zhannawk [14.2K]
Microsoft Excel or another spreadsheet program.
6 0
3 years ago
Other questions:
  • Write thanks to the IT teacher at the end of grade 5
    7·1 answer
  • How to get 60 fps pubg​
    9·2 answers
  • Describe how using active listening at work can help you be a better employee.
    15·1 answer
  • When creating a scene in Blender, you should change Blender Render to ______ to create the best lighting option?
    15·1 answer
  • The graph of which function has an axis of symmetry at x=-1/4​
    15·1 answer
  • Which approach to knowledge management capitalizes on tacit knowledge and requires heavy IT investment?
    7·1 answer
  • Number are stored and transmitted inside a computer in the form of​
    6·1 answer
  • Lasses give programmers the ability to define their own types. <br><br> a. True<br> b. False
    10·1 answer
  • What is Utility Software ? Name any two utility programs. <br>​
    15·2 answers
  • Write an alogorithm and draw the Flow Chart to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!