C program to check number is odd or even.

#include<stdio.h>
#include<conio.h>
int main()
{
    int num;
    printf("Enter any number: ");
    scanf("%d", &num);
    if(num%2 == 0)
        printf("\nIt's an even number.");
    else
        printf("\nIt's an odd number.");
    getch();
    return 0;
}
C program to check number is odd or even. C program to check number is odd or even. Reviewed by on December 22, 2019 Rating: 5

No comments:

Powered by Blogger.