C program for finding even or odd numbers. The questions may be asked for this C program is, write a program to find even or odd number in C & write a program in c to find whether a number is even or odd? Keep that in your mind and perform like wise. It is an useful C program for beginners.
EVEN OR ODD IN C
Find the given value is Even or odd in C. This C program is used to find the input value will be odd number or even number by using conditional statement of if…else by using this condition of if(value%2==0) it correct it will be even else odd.
[Read: Software Company Details] & [Love % Calculator]
C PROGRAM:
/* Title: Even or Odd Author: Vinoth Selvaraj © http://students3k.com */ //Header file section #include<stdio.h> #include,conio.h> void main() { Clrscr(); //Function is used to clear previous output //Program variable int value; printf("\n\n Find the value is even or odd"); //Display function printf("\n\n Enter the value "); scanf("%d",&i); //Getting input value function if(value%2==0) //Conditional statement { printf("\n Value is EVEN"); } else { printf("\n Value is ODD"); } getch(); }