write a program for even numbers?

Answer Posted / joe

#include<stdio.h>
//#include<conio.h>

int main()
{
//clrscr();
int *a;
printf("\nenter the no\n");
scanf("%d",&a);
if(*a <0)
{
printf("\nEnter correct number :\n");
}
else if(*a%2==0)
{
printf("no is even");
}
else
{
printf("odd no");
}
getch();
main();
}

Is This Answer Correct ?    15 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a dynamic array in c?

597


List the variables are used for writing doubly linked list program.

1623


What are the advantages of Macro over function?

1204


Differentiate between full, complete & perfect binary trees.

671


What are type modifiers in c?

623






What is anagram in c?

521


What is the difference between procedural and declarative language?

651


Tell us two differences between new () and malloc ()?

614


Explain about the functions strcat() and strcmp()?

598


What is the meaning of typedef struct in c?

594


Why main function is special give two reasons?

948


what is the significance of static storage class specifier?

1665


what are bit fields? What is the use of bit fields in a structure declaration?

1499


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

606


if p is a string contained in a string?

1405