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]
2 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]2 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
Hydraulic pressure is the same throughout the inside of a set of brake lines. What determines the amount of resulting mechanical
cestrela7 [59]

Answer: 1000 square ponds of force hope you know the answer

Explanation: i guessed

7 0
2 years ago
Three periods after a menu item (...) mean that clicking that command will open
erastovalidia [21]

I think its B.) A dialog box


7 0
3 years ago
Read 2 more answers
Write a program that will input a list of test scores in from the keyboard. When the user enters -1, print the average.
aivan3 [116]

Answer: -1 usually represents infinity.

Explanation:

It would keep going forever and not be able to stop without manually stopping it.

3 0
3 years ago
Read 2 more answers
Select all that apply.
Serhud [2]

Answer:

Page grouping

Page Setup grouping

Layout grouping

Schemes grouping

4 0
3 years ago
Why were video games invented?
Alenkinab [10]
The answer is in the following website: https://www.reference.com/history/were-video-games-invented-e9413d3dc1378766


4 0
3 years ago
Other questions:
  • A geologist is part of what career feild
    6·1 answer
  • Sam needs to create a spreadsheet for his coworkers. They will need to follow a crossed a long road of data. Sam would like to m
    15·1 answer
  • _______ is a form of crime that targets a computer system to acquire information stored on that computer system, to control the
    15·1 answer
  • Presentation software is the best file type for writing a research paper. <br> True <br> False
    10·1 answer
  • What is internet marketing??
    13·1 answer
  • Select four tasks associated with operating system maintenance. Cleaning inside the computer Defragmenting the hard drive Deleti
    11·1 answer
  • In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
    9·1 answer
  • Explica el empleo de cuentas y contraseñas en archivos
    6·1 answer
  • The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use
    13·1 answer
  • A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!