write a program for even numbers?

Answer Posted / nirdesh pal

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
printf("enter the number");
scanf("%d",&i);
if(i%2==0)
{
printf("number is even");
else
printf("number is odd");
}
getch();
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to throw some light on the b tree?

691


Why we not create function inside function.

1854


What is cohesion in c?

648


What is use of integral promotions in c?

760


Is c pass by value or reference?

690






What is the use of gets and puts?

694


What is c variable?

662


What is typedef example?

724


Does sprintf put null character?

690


What is modeling?

727


What is character set?

779


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

879


How is null defined in c?

761


What is New modifiers?

779


What is a structure member in c?

639