Saturday, June 18, 2016

C Program Code:Find Number is Even or Odd

C Program Code:

#include<stdio.h>

int main()
{
    int number;

    printf(" Find Number is Even or Odd in C \n");
    printf(" Enter a Number : ");
    scanf("%d", &number);

    if (number % 2 == 0)
    {
        printf(" %d is Even \n", number);
    }
    else
    {
        printf(" %d  is Odd \n", number);
    }

    printf(" Press enter to continue...\n");
    fflush(stdin);
    getchar();
    return 0;
}

Find Number is Even or Odd C Output Screenshot