Check Even Odd with Switch Statement
Check Even Odd with Switch Statement – C Program to input a number and check it for even or odd using a switch statement. Source Code #include <stdio.h> int main() { int n; printf(“Enter a number to check for Even/Odd:”); scanf(“%d”,&n); switch(n%2) { case 0: printf(“%d is Even”,n); break; case 1: printf(“%d is Odd”,n); break;… Read More »