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
Which language paradigm interacts well with database systems in business environments that use SQL?
HACTEHA [7]
The answer is C, can you mark me brain
6 0
3 years ago
What stylistic device does Reverend Jesse Jackson use in the following statement: "We must relate instead of debate; we must ins
vivado [14]

Answer:

Parallelism

Explanation:

Parallelism:- It is a linguistic device.It is basically the use of components that are similar in their meaning ,sound or construction.So in the statement by Reverend Jesse Jackson .The statement uses words that sound similar and the statements have similar construction.

So we conclude that the answer is parallelism.

8 0
3 years ago
ACL 1 has three statements, in the following order, with address and wildcard mask values as follows: 1.0.0.0 0.255.255.255, 1.1
larisa86 [58]

If a router tried to match a packet sourced from IP address 1.1.1.1 using this ACL, the first statement will be used.

a. First

<u>Explanation:</u>

We use ACL technology to make basic security level in the network.  ACL is strictly used to update the routing in the network and make sure network pears and make sure the flow control for network traffic is followed.

Since it is routing ip address through ACL statement. It all depends on how the network engineer routed the traffic in the network. A packet with source IP address 1.1.1.1 would match any of the three explicitly configured commands described in the question. As a result, the first statement will be used.

The router searches the ACL statement by order and when the match is found it stops execution of the ACL statement that will match with the first occurrence.

7 0
3 years ago
What are the uses of navigation keys​
Zolol [24]
The navigation keys allow you to move the cursor, move around in documents and webpages, and edit text.
3 0
1 year ago
Create your own array of strings. Call the array anything you like as long as it is a valid variable name. The list should conta
Finger [1]

Answer:

alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

newList = []

N = 3

for i in range(N):

   newList.append(alphabets[i] * 3)

print(newList)

Explanation:

  • Initialize the alphabets.
  • Use a for loop to append three alphabets to new list.
  • Finally print the new list.
5 0
3 years ago
Other questions:
  • Which of the following is a key component to your individual internet safety? government regulations
    13·1 answer
  • Skinner designed a soundproof apparatus, often equipped with a lever or bar, with which he conducted his experiments in operant
    9·1 answer
  • Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even nu
    13·1 answer
  • ​ In addition to analyzing logic and program code, a project team usually holds a session with users, called a _____, to review
    5·1 answer
  • You work for a company that is growing. Originally, all the users in all departments had access to all the data in the database.
    6·2 answers
  • Which of the following describes ETL? a) A process that transforms information using a common set of enterprise definitions b) A
    14·1 answer
  • Which diagram is used as a popular technique for investigating causes and effects? 1. Cause and effect 2. Fishbone/lshikawa 3. R
    13·1 answer
  • // Exercise 4.16: Mystery.java
    6·1 answer
  • Which mark is an indicator of invalid data in a cell?
    11·1 answer
  • balance exercises used for introducing balance training should initially involve little joint motion and improve what type of co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!