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
If you're driving a car and know there's a motorcyclist around you, you should______. A. Not change your driving B. Check your b
Sedaia [141]

b check your blind spots frequently i guess not sure

5 0
3 years ago
A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, d
lesantik [10]

Answer:

C

Explanation:

Well, in your inquiry it says

"A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, drawing, and presentation management tools"

We know it isn't Microsoft Word, because Microsoft Word doesn't have a presentation feature. We know it isn't Excel because Excel is only meant for spreadsheet and analytics data.

However, on PowerPoint all these points make sense, PowerPoint is a tool that Microsoft created for the capabilities such as to present information, you can also put information inside of graphics as well, you can also draw, and outline too.

5 0
3 years ago
You are writing code to store the length of a side of a square. Which one is a good variable name
solniwko [45]

Answer:

Explanation:

Hi, pooop! i really like your username

In programming we should use camelcase whichLooksLikeThis because the capital letters are kind of like the back of a camel

so perhaps make the variable name:

lengthSquare

it looks like your question has multiple choice answers.. but i cant see them... so i just made up my own answer...

3 0
3 years ago
After you divide the viewfinder appropriately you locate the subject? PLZ ANSWER MY TEST DO BY TONIGHT
Sloan [31]
The Answer is A: <span>along one of the division lines. </span>
4 0
3 years ago
An array of 100 elements is to be
LekaFEV [45]

Answer:

It will always return (completely sorted) after 99 data comparisons.

It will always require at least 99 comparisons

Explanation:

3 0
3 years ago
Other questions:
  • In microsoft windows when a window is minimized what happens to that window
    9·1 answer
  • Which of the following might indicate a source on the internet is NOT reliable?
    6·1 answer
  • P3. In Section 4.2 , we noted that the maximum queuing delay is (n–1)D if the switching fabric is n times faster than the input
    8·1 answer
  • The top of a ladder must extend how many feet above the surface a worker is climbing onto?
    7·1 answer
  • To what would you compare the transport layer?
    14·1 answer
  • Write a public static method named evens that takes in 1 argument int a, and returns a String containing all positive even numbe
    8·1 answer
  • ¿En qué países se ha implementado un sistema de vigilancia a través de drones?, ¿qué aspectos positivos y negativos ha generado?
    13·1 answer
  • Which wireless standard uses the 2.4 GHz frequency band only?
    5·1 answer
  • • Do you think documentaries are best delivered in media such as films or documentary?
    10·1 answer
  • What is the accurate description
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!