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

Can you write the algorithm for Queue?

1563


what value is returned to operating system after program execution?

1615


How will you write a code for accessing the length of an array without assigning it to another variable?

630


Explain the red-black trees?

619


can we implement multi-threads in c.

683






How can I remove the trailing spaces from a string?

628


What is zero based addressing?

729


State the difference between x3 and x[3].

665


In C, What is the #line used for?

1106


Can you please explain the difference between exit() and _exit() function?

612


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1494


Tell us bitwise shift operators?

616


Explain how does free() know explain how much memory to release?

585


When was c language developed?

717


What is a static function in c?

645