C program to check weather a number is even or odd
#include<stdio.h> main() { int n; printf("Enter an integer : "); scanf("%d",&n); if ( n%2 == 0 ) printf("Even\n"); else printf("Odd\n"); return 0; }
/*
Output: #1
Enter an integer : 5Odd
Output: #2
Enter an integer : 4Even
*/