To find whether a number is even or odd without using any
conditional operator??
Answer Posted / umair jatoi && zain ja
/* ZAIN JATOI AND UMAIR JATOI */
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n;
printf("Enter any number:");
scanf("%d",&n);
if(n&1)
printf("%d is Odd number",n);
else
printf("%d is even number",n);
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Is javascript written in c?
Are pointers integer?
Why do some versions of toupper act strangely if given an upper-case letter?
How can I access an I o board directly?
Explain zero based addressing.
why return type of main is not necessary in linux
How pointers are declared?
What is meant by keywords in c?
What is preprocessor with example?
What is the c language function prototype?
Explain how do you search data in a data file using random access method?
Define the scope of static variables.
What is pointer to pointer in c with example?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
Without Computer networks, Computers will be half the use. Comment.