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
Hue purchased 50 shares of stock on April 24, 2019. The price skyrocketed, so she decided to sell the stock in April of 2020. Wh
nadya68 [22]

Answer:

April 25, 2020

Explanation:

April 25, 2020

In order for an investment to be considered long-term, it must be held for longer than 1 year.

April 24th is not longer than a year, the only answer that is longer than a year of holding is April 25, 2020

8 0
3 years ago
Technician A says that generic scan tools must be able to read all generic OBD-II codes. Technician B says that all generic scan
Likurg_2 [28]

Answer:

A. Technicians A and B

Explanation:

When we're talking about generic scanners and about all OBD-II codes, in this case, both technician A and B is the correct answer. Because we can scan all OBD-II codes with a generic scan.

But the technician A just says generic tools must be able to read all generic OBD-II codes and technicians B just says generic scan tools must be able to read manufacture OBD-II code, both are correct.

4 0
3 years ago
Brainless is one the way if you help
V125BC [204]

Answer:

1. x - 6

2. p - ? = 7

i chose these equations because

a number - 6 = the weight of your backpack.

p - an unknown number without a substitute variable = slices of bread left.

3 0
2 years ago
Read the following scenario, and then answer the question.
maxonik [38]

Answer:

Monitor size

Explanation:

Hope this helps

4 0
3 years ago
Read 2 more answers
Why do people yeet yeet and ree
DiKsa [7]

Answer:

Cause they are trying to be annoying

Explanation:

Something is wrong with them :)

8 0
3 years ago
Read 2 more answers
Other questions:
  • You created a vm and installed windows server 2008 r2 over the network, using pxe boot. when you start the vm, it doesn't attemp
    7·1 answer
  • In controlling network traffic to minimize slow-downs, a technology called ________ is used to examine data files and sort low-p
    15·1 answer
  • Which of the following is a way to prevent wastes from contaminating the environment? A) Use absorbent pads to collect floor was
    11·2 answers
  • The position of a _____ is a nontechnical position responsible for defining and implementing consistent principles for setting d
    15·1 answer
  • Write a program to read 10 integers from an input file and output the average, minimum, and maximum of those numbers to an outpu
    14·1 answer
  • A healthcare organization received notification that a hospital employee’s laptop that contained PHI was inadvertently left at a
    14·1 answer
  • 3n - 12 = 5n - 2<br> how many solutions?
    15·1 answer
  • Write a method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclus
    8·1 answer
  • Which software manages the functioning of the entire computer system<br>​
    7·2 answers
  • If a company gave you a free version of their software and encouraged you to try and improve it and share it with the only commu
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!