C Program to find given number is Even or Odd.
Even or Odd :
EvenOrOdd.c
#include<stdio.h>
int main(void)
{
int n;
printf("Enter any number : ");
scanf("%d",&n);
if(n%2==0)
goto even_number;
else
goto odd_number;
even_number:
printf("Given number is even\n");
goto end;
odd_number:
printf("Given number is odd\n");
goto end;
end:
printf("\n");
return 0;
}
Output:
Terminal
Enter any number : 10
Given number is even
Enter any number : 7
Given number is odd
Happy Learning 🙂