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
What is the need of structure in c?
What is data structure in c language?
Which one would you prefer - a macro or a function?
Find MAXIMUM of three distinct integers using a single C statement
What is const volatile variable in c?
What is the best way to comment out a section of code that contains comments?
Explain can static variables be declared in a header file?
Write a code to generate a series where the next element is the sum of last k terms.
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is the use of pointers in C?
Is c procedural or functional?
Under what circumstances does a name clash occur?
can any one provide me the notes of data structure for ignou cs-62 paper
How can I call fortran?
write a progrmm in c language take user interface generate table using for loop?