A C Program to find odd or even.

// A Program to find odd or even.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int n, r;
    printf("Enter a number:");


    scanf("%d",&n);
    r=(n%2);
    if(r==0)
        printf("It is even number.");
    else
        printf("It is odd number.”);
    getch();
}

Output:












Nhận xét