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
solong [7]
3 years ago
9

Write a function that receives an integer list from STL and returns the sum of even numbers in the list (return zero if no even

number is in the list)
Computers and Technology
1 answer:
Doss [256]3 years ago
8 0

Answer:

int sumeven(int lis[],int n)

{

   int sum_e=0;//integer variable to store the sum.

   for(int i=0;i<n;i++)

       {

           if(lis[i]%2 == 0)//if the number is even adding to sum_e.

           sum_e=sum_e+i;

       }

   return sum_e;//retuning the sum.

   

}

Explanation:

The above written function is in C++.This function find the sum of even numbers in the list provided.It loops over the array and if the number is even adds to the variable sum_e finally return sum_e which having the sum of even numbers now.

You might be interested in
Most job applications are online. true or false
Sonja [21]

Answer:

True

Explanation:

4 0
3 years ago
How many components of a computer? ​
zepelin [54]

Answer:

There are five main hardware components in a computer system: Input, Processing, Storage, Output and Communication devices. Are devices used for entering data or instructions to the central processing unit.

Explanation:

8 0
3 years ago
Internet routing:_________. A. precomputes the most efficient route and uses it to ensure rapid packet delivery. B. broadcasts a
zvonat [6]

Answer:

<u> A. precomputes the most efficient route and uses it to ensure rapid packet delivery.</u>

Explanation:

In simple words, what Internet routing means is a process where a router decides which path data packets should follow that are more efficient in delivering the packets across computers.

For example, we can liken the process to the duties of a tour guide in a museum or large building in directing visiting guests who came to explore the museum.

7 0
3 years ago
5. What is the number one cause of accidents in the classroom, office, and home?
sp2606 [1]

Answer:

Lack of safety in technology and structures.

4 0
4 years ago
IF ANYONE USES THE COMPUTER PROGRAM SCRATCH I NEED YOUR HELP!! 15 POINTS!!
Irina-Kira [14]
The mouse down block C, 2) is c, and
4 0
4 years ago
Read 2 more answers
Other questions:
  • ________ is the presentation of information to the user and the acceptance of the user’s commands. a.data storageb.data access l
    7·1 answer
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • As a trainer for Exempla Healthcare, Tina is faced with many challenges to properly training her new hires. There are over 40 di
    15·1 answer
  • Which can be inserted using the insert panel in dreamweaver cc?
    9·1 answer
  • A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled pl
    8·1 answer
  • The following code accomplishes which of the tasks written below? Assume list is an int array that stores positive int values on
    9·1 answer
  • Who tryna play among us
    8·2 answers
  • What is required to view other users’ calendars in Schedule view? Check all that apply.
    15·1 answer
  • 6) Read the article posted on The Verge entitled How to fight lies, tricks, and chaos online and summarize the four steps. Then
    15·1 answer
  • John is directing a television series. He has to shoot a scene that presents the lead character in a dominating and commanding p
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!