write a program for even numbers?

Answer Posted / dwarika

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

Is This Answer Correct ?    56 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

880


How can I convert a number to a string?

697


How can I implement a delay, or time a users response, with sub-second resolution?

724


If I have a char * variable pointing to the name of a function ..

763


What is c language used for?

643






Explain what is page thrashing?

727


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

1683


What are the 4 types of programming language?

667


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

696


Under what circumstances does a name clash occur?

791


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

691


What is c mainly used for?

706


Explain what is the difference between far and near ?

743


What are header files and what are its uses in C programming?

713


Function calling procedures? and their differences? Why should one go for Call by Reference?

733