C program to check whether the given number is odd or even

/* C program to check whether the given number is odd or even */

#include

int main() {

    int number;

    printf("Enter any integer: ");
    scanf("%d", &number);

    if(number % 2 ==0)
         printf("%d is even number.", number);
    else
         printf("%d is odd number.", number);

    getch();
    return 0;

}
Advertisements