write an algo to find the sum of
even number from 1to n
Chat with our AI personalities
501
The sum of two even numbers is always an even number.
52+54+56 = 162
If this question means "in the interval 0 to 16 inclusive, is the sum of the odd numbers the same as the sum of the even numbers ?" then the answer is no. The sum of the even numbers is eight more than the sum of the odd ones.
The sum of two odd numbers is always even; the sum of three odd numbers is always odd; the sum of four odd numbers is always even; the sum of five odd numbers is always odd; etc