Thursday

Write a C program to find out whether it is odd or even for or any integer input through the keyboard

#include<stdio.h>
#include<conio.h>
void main()
  {
    int n;
    printf("\nEnter any number: ");
    scanf("%d",&n);
    if(n%2==0)
     printf("%d is Even",n);
    else
     printf("%d is Odd",n);
    getch();
  }

No comments:

Post a Comment

Rahul-Notes