answersLogoWhite

0

How do you find sum of even numbers in c plus plus?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Best Answer

That is an unsolvable problem, because there are an infinite number of even numbers. However, with limits, you could say...

int NMax = ...;

int Sum = 0;

for (N=2; N<=NMax N+=2) Sum += N;

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find sum of even numbers in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you determine weather a sum of severals numbers such as 13 plus 45 plus 24 plus 17 is even or odd?

Count how many of the numbers are odd. If an odd number of them are odd, then their sum is odd. If an even number of them are odd, then their sum is even.


Find the sum of first 10 even numbers?

The sum of the first 10 even numbers is 110.


What does even plus even make?

Even. The sum of two even numbers is always even.


What is formula to find sum of n even numbers?

There is no formula that will sum n even numbers without further qualifications: for example, n even numbers in a sequence.


Write a program in c plus plus for finding the sum of first 10 even numbers?

int i, sum = 0; for (i=0; i&lt;20; i+=2) sum+=i;


Why is the sum of three odd numbers always odd?

Because the sum of two odd numbers is always even and the sum of that even number plus another odd number is always odd.


Is 2001 the answer of the sum of four consecutive integers?

No. The sum of four consecutive integers is two odd numbers plus two even numbers which is an even number. 2001 is an odd number, therefore it cannot be the sum of four consecutive numbers.


Can you find any two even numbers whose sum is not an even number?

no


How you Draw a flow chart for the sum of even numbers within 0 20?

draw the flow chart to find the sum of even numbers from 1.......200


Find the sum of the first 50 even numbers what is the sum?

of all the things i got is 2550


4 plus 10 plus 16 plus plus 70 find the sum of this series?

4 plus 10 plus 16 plus 70 equals 100. To find the sum of this series, simply add all the numbers together.


Find 3 consecutive even numbers whose sum is 57?

The sum of two evens is even so the sum of any number of evens is even. It is, therefore, impossible for the sum of three even numbers, whether or not consecutive, to be 57, which is an odd number.