Write c program to check whether a number is even or odd
Answers
Answered by
1
Answer:
An even number is an integer that is exactly divisible by 2. Example: 0, 8, -24
An odd number is an integer that is not exactly divisible by 2. Example: 1, 7, -11, 15
Answered by
1
Explanation:
#include<iostream.h>
#include <conio.h>
void main ()
{
int. no.
cout<<"enter any number ";
cin >>no.;
if (no%2==0)
{
cout<<even number";
}
else
{
cout<<"odd no. ";
}
getch ();
}
Similar questions
Hindi,
6 months ago
Computer Science,
11 months ago
Social Sciences,
1 year ago
Geography,
1 year ago