Discussion Forum

Even or Odd

Even or Odd

by Ishtiaque Ahmed(212-15-4217) -
Number of replies: 0

#include <stdio.h>

int main() 

{

    int num;

    printf("Enter a Number : ");

    scanf("%d", &num);

    if(num % 2 == 0)

      {

        printf("%d is Even number.", num);

      }

    else{

        printf("%d is Odd number.", num);

          }

    return 0;

}