find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / mohd parvez 09311349697
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a number:");
scanf("%d",&num);
num%2&&printf("Number is ODD")||printf("Number is EVEN");
getch();
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What does emoji p mean?
When should a type cast not be used?
Do you have any idea how to compare array with pointer in c?
What is a scope resolution operator in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Describe wild pointers in c?
Can stdout be forced to print somewhere other than the screen?
What are dangling pointers in c?
Is printf a keyword?
What is the use of in c?
Write a program to check armstrong number in c?
Explain how can I right-justify a string?
Explain what is the difference between functions abs() and fabs()?
What's the best way of making my program efficient?
Write a program to show the change in position of a cursor using c