In this program to determine the value is Odd or Even. In this program you can easily find odd or
even number using function. I am sure the following coding is much better
method, so I am posting here before I write out the same long winded method in
yet another language.
Source Code:
#include <iostream>
using namespace std;
int even_odd (int a);
void main ()
{
int
a, b;
cout<<"Enter
the Number ";
cin>>a;
if
(a%2==0 && a>0)
cout<<"Even
Number \n";
else
cout<<"Odd
Number \n";
}
int
even_odd (int a)
{
return
a;
}
Tag: what is a odd number, which numbers are odd, what are
odd number, what odd numbers, what are the odd number, integer random, odd
number is, programming in c, dev c download, programming with c, in c
programming, programmers, microsoft visual c, c compilers, even, odd number,
program
| Follow @computercolumns | ||||

0 comments:
Post a Comment
Some HTML Code