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

The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

761


what are the facialities provided by you after the selection of the student.

1658


How will you find a duplicate number in a array without negating the nos ?

1642


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

650


What are the advantages of the functions?

604






Are bit fields portable?

673


What is the difference between the local variable and global variable in c?

529


Explain what is the benefit of using an enum rather than a #define constant?

719


When is a null pointer used?

640


What is the difference between far and near in c?

599


Is boolean a datatype in c?

543


Why is c called a mid-level programming language?

722


What are the advantages and disadvantages of a heap?

706


Explain how do you determine the length of a string value that was stored in a variable?

668


What is #include called?

566