/* 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