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

Why c is called procedure oriented language?

579


i got 75% in all semester am i eligible for your company

1736


What is the difference between exit() and _exit() function in c?

583


What are the types of operators in c?

611


What is the data segment that is followed by c?

612






Explain c preprocessor?

683


Why is sizeof () an operator and not a function?

586


What standard functions are available to manipulate strings?

560


Why isnt there a numbered, multi-level break statement to break out

587


What is an lvalue?

636


If errno contains a nonzero number, is there an error?

805


When should a far pointer be used?

604


Differentiate Source Codes from Object Codes

822


Which of these functions is safer to use : fgets(), gets()? Why?

633


I have seen function declarations that look like this

601