Learning C++ Declaration of Constants. This time I will discuss about the determination of even or odd numbers in C + + program that I have made.
Even number is a number divisible by two, while the odd number is a number that is not divisible by 2. so it is very simple once the manufacture of this program, no need to make it convoluted.
The steps are like this:
1. enter the number
2. If the number divided by 2 = 0, then the even number
3. If not, then the odd number
For more details, watch as his source code under ni. Here it is the source code.
/ / C + + program to determine an even number or odd
# include <iostream>
# include <stdio.h>
# include <conio.h>
void main ()
court <<"Enter the value of Numbers:";
if (number% 2 == 0)
court <<"Numbers" <<number <<"is an even number";
court <<"Numbers" <<number <<"is odd";