write a program for odd numbers?

Answer Posted / vivek singh

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter the number:");
scanf("%d",&num);
if(num%2==0)
{
printf("Number is Even");
}
else
{
printf("Number is Odd");
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is d scanf?

775


What are comments and how do you insert it in a C program?

947


What is c basic?

856


What does #pragma once mean?

899


In which header file is the null macro defined?

1099


List the different types of c tokens?

815


Write a program to implement queue.

857


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

853


What is string concatenation in c?

759


Write programs for String Reversal & Palindrome check

778


What is calloc malloc realloc in c?

797


Can you define which header file to include at compile time?

782


How many header files are in c?

734


What is the explanation for modular programming?

889


Which built-in library function can be used to match a patter from the string?

971