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
Why header file is used in c?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What is logical error?
Explain what are the advantages and disadvantages of a heap?
Why ca not I do something like this?
What is the difference between null pointer and wild pointer?
What is bash c?
Explain Function Pointer?
Do you know the difference between exit() and _exit() function in c?
Explain about the functions strcat() and strcmp()?
What are the 5 data types?
What is character set?
What are the application of void data type in c?
Why is c called c?
Give me the code of in-order recursive and non-recursive.