write a program to accept a number and check if it is odd or even


 /* write a program to accept a number and check if it is odd or even */

#include<stdio.h>

#include<conio.h>

void main()

{                int n;

                  clrscr();

                  printf("\n Enter a number = ");

                  scanf("%d%d",&n);

                  if(n/2==0)

                                printf("\n%d is Even",n);

                  eles

                                printf("\n %d is Odd",n)

                  getch();

}

/*Output :---

Enter a number = 4    Or    Enter a number = 5

Even                                   Odd

*/                                                                 

                                                                  👇💬😊💭              

No comments:

Post a Comment

This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding

c program, Advance coding, c++ program, simple program, Advance language

online quiz Application project page MCA final year project

  Here we making a quiz application ppt presentation for college project so that our project idea will like to our professor and teacher  fi...