From f4058bca05506eeaad07151d2ac4fdcc09468a59 Mon Sep 17 00:00:00 2001 From: afee <37291431+afee@users.noreply.github.com> Date: Wed, 31 Oct 2018 15:47:30 +0530 Subject: [PATCH] Update odd.c --- odd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/odd.c b/odd.c index 270ded7..d756f23 100644 --- a/odd.c +++ b/odd.c @@ -1,11 +1,12 @@ +// this is a program to check whether a number is odd or even #include int main() { int n; -scanf("%d",&n); -if(n%2==0) -printf("Odd\n"); -else +scanf("%d",&n);//reading the number to be checked +if(n%2==0)//check whether number is divisible by two printf("Even\n"); +else +printf("Odd\n"); return 0; }