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

Explain how can you check to see whether a symbol is defined?

661


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1627


How can a string be converted to a number?

515


What is methods in c?

639


Explain that why C is procedural?

655






How can I open files mentioned on the command line, and parse option flags?

590


Are there namespaces in c?

566


How to get string length of given string in c?

607


How can variables be characterized?

1648


Can the “if” function be used in comparing strings?

592


What is static memory allocation? Explain

629


What are the parts of c program?

633


What are the header files used in c language?

585


Under what circumstances does a name clash occur?

690


What is the purpose of sprintf?

617