write a program for even numbers?

Answer Posted / k.naveen kumar

#include<stdio.h>
#include<conio.h>
main()
{
int a;

printf("Please enter the number :=> ");
scanf("%d",&a);

if (a%2==0)
printf("Even");
else
printf("odd");
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do character constants represent numerical values?

844


Why we use int main and void main?

537


Explain how does free() know explain how much memory to release?

575


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1918


What are the scope of static variables?

601






What is return type in c?

639


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

588


Why c is a procedural language?

584


What is the benefit of using #define to declare a constant?

607


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

941


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3143


In which header file is the null macro defined?

857


What is file in c preprocessor?

654


What is the difference between %d and %i?

596


What does it mean when a pointer is used in an if statement?

602