write a program for even numbers?

Answer Posted / v.karthikeyan

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

printf("Enter a number to know the entered number is odd or
even \n");
scanf("%d",&num);

if (num%2==0)
{
printf(" The number is Even");
else
printf(" The number is Odd")
}
getch();
}

Is This Answer Correct ?    88 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a c code by using memory allocation for add ,multiply of sprase matrixes

2407


Does * p ++ increment p or what it points to?

731


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1353


What is the difference between new and malloc functions?

663


What is the process to create increment and decrement stamen in c?

673






What is the c language function prototype?

742


Is c weakly typed?

646


Here is a good puzzle: how do you write a program which produces its own source code as output?

686


What language is c written?

655


Why c is a procedural language?

697


When can you use a pointer with a function?

645


What is #pragma statements?

687


What is a string?

756


Why we use break in c?

643


Stimulate calculator using Switch-case-default statement for two numbers

2555