Pages

Visitors

Saturday, 10 December 2011

To Check if a Number is even or Odd

#include <stdio.h>

void main()

{

int a;

printf(" Please enter the number to check : ");

scanf("%d",&a);

if(a%2 == 0;)

printf("\nThe Number %d is Even.",a);

else
printf("The number %d is odd.",a);

getch();

}

No comments:

Post a Comment