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
Select the correct statement(s) regarding partial mesh networks.
sweet [91]

Answer: all the answers are correct

Explanation:

Partial mesh networks is simply a packet switching networks which is connected and require that there should be establishment of a circuit before the exchange of packets.

Partial mesh networks are less expensive to implement when they're being compared to the full mesh networks and are also less redundant.

The correct statements regarding partial mesh networks are:

•the number of links connecting nodes in a partial mesh network depends upon the availability and reliability requirements of the network

• switches play an integral role in a partial mesh network, where several paths through the network are available

• redundant links and switches are used to improve the availability and reliability of partial mesh networks

6 0
3 years ago
(tco 3) what vbscript boolean operator could be used to replace the nested selection structure in this pseudocode? if empmedical
Leto [7]
You want both conditions to be true, so you can "And" them.
In vbscript, the and is written as "And" (not as && like other languages), so you get:

<span>If (empmedicalins = "y") And (empdentalins = "y") Then
    print empidnumber, emplastname, empfirstname
Endif</span>
3 0
3 years ago
The web server software used has a significant impact on how a web site's web pages look on a user's computer.
soldi70 [24.7K]
False. Apache (which serves about 63% of the web pages) just serves the files. How it looks is a combination of the HTML and CSS that the site uses.
6 0
3 years ago
When sensing nonverbal communication, the listener candetermine happiness, fear, and sadness primarily from______body movementge
lilavasa [31]

Answer: Eyes and face

Explanation: The non-verbal communication defines the communication through the facial expression gesture, posture etc. This type of communication happens where there is no requirement or permission of being verbal or just to judge a person without having communication with them .The expression obtained from face are enough to determine the emotion of a person whether he/she is happy, sad or scared.

7 0
3 years ago
what should the timing of transition slides be per minute? maintain the flow of the presentation to ______ slides per minute.
murzikaleks [220]

Answer:

1-2

Explanation:

It depends on the amount of information that you have on each slide. You want to make sure you're not going too fast but also make sure you arent taking up to much time. Be sure to speak clearly it will make the presentation better by looking clean and time organized. hope this helps :)

8 0
3 years ago
Other questions:
  • Which of them does not support decision making? Options DSS, GDSS, ESS All of above
    10·1 answer
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • What is primary storage
    11·2 answers
  • Soo...My Old 3DS XL haven't been touched in around a year...So i tried to charge it but no LED lights opened..Even the power but
    14·1 answer
  • GIVING BRAINLIEST What does output allow a computer to do? Display information Receive information Do complex math problems Do m
    6·2 answers
  • How to get out of compatibility mode in word?
    15·1 answer
  • Using Phyton
    9·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
    11·1 answer
  • Given an initialized variable fileName, write a sequence of statements that create a file whose name is given by the variable an
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!