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
Umnica [9.8K]
3 years ago
6

Write a function called printEvens that prints all the even numbers between 2 and 20, inclusive. It will take no arguments and r

eturn nothing. You must also use a looping statement in the code to get credit for printing (i.e. no cout << 2 << " " << 4 " " << ...).
Computers and Technology
1 answer:
nataly862011 [7]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

void printEvens() {

   for (int i = 2; i <= 20; i++) {

       if (i % 2 == 0)

           cout << i << " ";

   }

}

int main() {

   printEvens();

   return 0;

}

Explanation:

- Inside the function, initialize a for loop that <u>goes from 2 to 20</u>.

- Inside the for loop, check if the <u>numbers are divisible by 2</u>. If yes, print the number

- Inside the main, call the function

You might be interested in
I have a question, but it's not a math question. Can anyone give me 5 unblockers for school computers? If you answer this, you w
ValentinkaMS [17]

Answer:

I mean if your talking about games then just try Cool math I will give link in comments

Explanation:

4 0
2 years ago
Read 2 more answers
19. in the array implementation of a queue, the pop operation is most efficient if the front of the queue is fixed at index posi
ICE Princess25 [194]

It is true that in the array implementation of a queue, the pop operation is most efficient if the front of the queue is fixed at index position. The correct option is a.

<h3>What is pop operation? </h3>

The removal of an element is referred to as a pop operation. Again, because we only have access to the element at the top of the stack, we can only remove one element. We simply take the top of the stack off.

A push operation decrements the pointer before copying data to the stack; a pop operation copies data from the stack before incrementing the pointer.

The pop operation in an array implementation of a queue is most efficient if the queue's front is fixed at index position.

Thus, the correct option is a.

For more details regarding pop operation, visit:

brainly.com/question/15172555

#SPJ1

6 0
1 year ago
you might propose a(n) program for your country if you wanted to hire a large number of manual laborers from neighboring countri
miskamm [114]

You might propose  guest worker program for your country if you wanted to hire a large number of manual laborers from neighboring countries to build a large dam or canal, with the understanding that they would not be granted any other privileges or legal status in your country, after the project is finished.

<h3>What is guest worker program?</h3>
  • In the absence of a ready supply of replacement workers, guest worker programs enable foreign workers to live and work temporarily in a host nation.
  • For temporary employment lasting less than a year, the United States now offers two guest worker programs: the H-2A program for temporary agricultural work and the H-2B program for temporary non-agricultural work.
  • Guest workers will be eligible for all federal programs, including Social Security and Medicare, if they are granted green cards. Additionally, low-skilled, low-income guest workers bring along their spouses and kids, who are enrolled in local schools and qualify for a variety of state benefits.

To learn more about  program refer to:

brainly.com/question/20534047

#SPJ4

4 0
1 year ago
Why backup system of data and software is necessary. ​
zavuch27 [327]

Answer:

The purpose of the backup is to create a copy of data that can be recovered in the event of a primary data failure. Primary data failures can be the result of hardware or software failure, data corruption, or a human-caused event, such as a malicious attack (virus or malware), or accidental deletion of data.

7 0
3 years ago
Which of the following statements is true? Methods and instance variables can both be either public or private. Information hidi
Alex777 [14]

Answer:

B

Explanation:

8 0
3 years ago
Other questions:
  • Technologies designed to replace operating systems and services when they fail are called what?
    15·1 answer
  • Which window allows you to view and change your computer's system information and settings?
    9·2 answers
  • Security breaches are easier to address with which payment form?
    11·2 answers
  • Which of the following tools enables a production mixer to sync audio and video?
    7·1 answer
  • Reading (BCK FORM 2C IT 2020-2021)
    12·2 answers
  • Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of
    7·1 answer
  • A python program for the following output using for loop.
    13·1 answer
  • Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
    10·2 answers
  • How can you protect your information when using wireless technology
    10·1 answer
  • **HELP ME PLS**
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!