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

Tell me the use of bit field in c language?

629


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1856


When is a void pointer used?

678


How pointer is different from array?

579


What does void main () mean?

733






What is static memory allocation? Explain

632


What is string constants?

662


What is calloc() function?

625


how to find binary of number?

3439


What are the complete rules for header file searching?

674


define string ?

669


What is #include called?

567


Explain what are the standard predefined macros?

651


Is null always equal to 0(zero)?

586


Why is c fast?

605