How To Find Odd And Even Number

Introduction 
  • In this blog,  I have explained about how to find out if a number is odd or even.
Software Requirements 
  • Turbo C++ OR C
Programming
  1. #include <stdio.h>     
  2. int main()  
  3. {  
  4.    int n;  
  5.    
  6.    printf("Enter an integer\n");  
  7.    scanf("%d", &n);     
  8.    if (n%2 == 0)  
  9.       printf("Even\n");  
  10.    else  
  11.       printf("Odd\n");  
  12.    
  13.    return 0;  
  14. }  
Explanation 
  •   From the programming, the number can be found out as odd or even.
Output

Output
 
Conclusion
  •  Thus, the program has been created.
Next Recommended Reading Finding Area Of Circle In C Programming