write a program for odd numbers?

Answer Posted / mahendiran

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
printf("Enter the number");
scanf("%d", &i);
if(i%2==0)
{
printf("the number is even %d", i);
}
else
{
printf("The number is odd %d", i);
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

all c language question

2155


How do you use a 'Local Block'?

909


What does %2f mean in c?

944


Explain Function Pointer?

882


Explain bit masking in c?

885


The file stdio.h, what does it contain?

866


Difference between Shallow copy and Deep copy?

1765


What are the different types of endless loops?

816


What is void pointers in c?

764


What is the difference between union and structure in c?

759


How can you find out how much memory is available?

798


What are dangling pointers? How are dangling pointers different from memory leaks?

901


Can two or more operators such as and be combined in a single line of program code?

1098


What are operators in c?

772


What are the types of pointers in c?

728