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; }