C Program To Check The Number Whether It Is Even or Odd( Switch Case) - HelpMeOutAlways

Friday, June 15, 2018

C Program To Check The Number Whether It Is Even or Odd( Switch Case)

#include<stdio.h>
main()
{
int num;
printf("Enter Any Integer\n");
scanf("%d",&num);
switch(num%2)
{
case 0:
printf("%d is Even Number",num);
break;
case 1:
printf("%d is Odd Number",num);
break;

}
return 0;

}


Output:



switch case example

switch case exercise

No comments:

@way2themes