Home Uncategorized Even or Odd in C

Even or Odd in C

SHARE

Here we written code for to check given number is even or odd.

For improvement of your coding skills we give some tasks along this. If you solve this tasks and send to our email (onlineexamshubteam@gmail.com) with your details. we will display your details(like Name, City, college, photo) in our site.

Task : Write a c program to read two values and check whether the second number is factor of first number or not.

Write a C Program to Find Whether the Given number is Even or Odd.

#include<stdio.h>
int main()
{
int a;
printf(“Enter a number values :”);
scanf(“%d”,&a);
if(a%2==0)
printf(“Given number is EVEN number\n”);
else
printf(“Given number is ODD number\n”);
return 0;
}

Output :
i) Enter a number : 20968
Given number is EVEN number
ii)Enter a number : 4625
Given number is ODD number

Back to the programs list.

Task Achievers

Task Achiever

Name:D.BADHRINADH
City: NARASARAOPET
College NARASARAOPET INSTITUTION OF TECHNOLOGY, NARASARAOPET.