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
Define Spanning-Tree Protocol (STP)
What is cohesion and coupling in c?
What is the difference between functions getch() and getche()?
What is new line escape sequence?
can anyone please tell about the nested interrupts?
What is the difference between the local variable and global variable in c?
What is the purpose of macro in C language?
Explain what is the concatenation operator?
What are variables c?
Explain what is the stack?
can any one provide me the notes of data structure for ignou cs-62 paper
How do I read the arrow keys? What about function keys?
What is an endless loop?
In a byte, what is the maximum decimal number that you can accommodate?
Tell us two differences between new () and malloc ()?