Created
November 3, 2020 05:54
-
-
Save amarjeetsahoo/339c6da4382f4ab19e462b29f2d8d906 to your computer and use it in GitHub Desktop.
Program to check if the number is odd or even by divide and multiply by 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int n; | |
printf("Enter a number"); | |
scanf("%d",&n); | |
if((n/2)*2==n) printf("%d is Even",n); | |
else printf("%d is Odd",n); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment