find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / abhradeep chatterjee
ya. the first answer has impressed me.
#include<stdio.h>
main()
{
int n;
string p[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the best way of making my program efficient?
Why we use conio h in c?
Are the variables argc and argv are always local to main?
will u please send me the placement papers to my mail???????????????????
What is the difference between a function and a method in c?
What are dangling pointers in c?
Is javascript based on c?
Explain union. What are its advantages?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Which is best linux os?
the question is that what you have been doing all these periods (one year gap)
What is the difference between local variable and global variable in c?
What is time null in c?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is a good data structure to use for storing lines of text?