write a program for odd numbers?

Answer Posted / pratikjis@yahoo.com

#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 ?    36 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why static variable is used in c?

580


What library is sizeof in c?

592


What tq means in chat?

607


what will be maximum number of comparisons when number of elements are given?

1424


What is the difference between text files and binary files?

694






Differentiate between the expression “++a” and “a++”?

721


What are the types of operators in c?

628


difference between native and cross compilers

1688


Write a program to print ASCII code for a given digit.

700


How many levels of indirection in pointers can you have in a single declaration?

612


How can my program discover the complete pathname to the executable from which it was invoked?

677


Is there a way to compare two structure variables?

627


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

680


Why do we use null pointer?

624


Is c procedural or object oriented?

597