Write a programme to find even numbers without using any
conditional statement?
Answer Posted / sridhar
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c,d; /*declaring variable using int*/
clrscr();
printf("enter the numbers:")
scanf("/n%d/n%d",&a,&b);/*getting number using scanf*/
c=a,b;
d=(c/2==0);
printf("the even number is:%d",d)/*print the final answer*/
getch();
}
| Is This Answer Correct ? | 8 Yes | 25 No |
Post New Answer View All Answers
How do I swap bytes?
How can you avoid including a header more than once?
In c language can we compile a program without main() function?
Are global variables static in c?
How can you find the exact size of a data type in c?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What is meant by initialization and how we initialize a variable?
Explain the difference between #include "..." And #include <...> In c?
Explain bit masking in c?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What does != Mean in c?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
How does sizeof know array size?