Write A C program to determine whether a number is "ODD" or "EVEN" and print the message.

Subject Programming Language
NU Year Set: 1.(d) Marks: 8 Year: 2013

#include <stdio.h>

int main()

{

    int number;

 

    printf("Enteran integer: ");

    scanf("%d",&number);

 

   

    if(number %2 == 0)

        printf("%dis even.", number);

    else

        printf("%dis odd.", number);

 

    return 0;

}
Login to post your comment.