Sum of Even and Odd numbers in C#


Sajjad Arif Gul - April 29, 2014 - 0 comments

Even Numbers Series

Even numbers can be divided evenly into groups of two. The number four can be divided into two groups of two. Even numbers always end with a digit of 0, 2, 4, 6 or 8.
e.g. 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 are even numbers.

Odd Numbers Series

Odd numbers can NOT be divided evenly into groups of two. The number five can be divided into two groups of two and one group of one. Odd numbers always end with a digit of 1, 3, 5, 7, or 9.
e.g. 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 are odd numbers.

In this C# program, we will write source code to calculate Even and Odd Numbers.

Source Code:

Output:

Output of Sum of Even and Odd numbers in C#

Output of Sum of Even and Odd numbers in C#

Author avatar

Sajjad Arif Gul

http://sajjadgul.com
Hi! I am Sajjad Arif Gul, Software Engineer, Web & Mobile Developer from Karachi Pakistan. I love sharing my knowledge that could possibly help someone’s life in some capacity. Happy Coding.

Related posts

Post a Comment

Your email address will not be published. Required fields are marked *