Posts

Showing posts with the label even odd program in c

c program to find even and odd number

Image
c program to find even and odd number  if you are using turbo c compiler please use  #include<conio.h>  header file. and if you are using devc++ or any other compiler than simply go through the given program below. #include <stdio.h> int main() {     int number;     printf("Enter an integer: ");     scanf("%d", &number);     // True if the number is perfectly divisible by 2     if(number % 2 == 0)         printf("%d is even.", number);     else         printf("%d is odd.", number);     return 0; }