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 can you convert integers to binary or hexadecimal?
How can I open files mentioned on the command line, and parse option flags?
Who invented b language?
How will you write a code for accessing the length of an array without assigning it to another variable?
What is ctrl c called?
What is the modulus operator?
How can I trap or ignore keyboard interrupts like control-c?
Why c language is called c?
How can I remove the trailing spaces from a string?
Why do we use pointer to pointer 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
what is uses of .net
What is else if ladder?
how to make a scientific calculater ?
Why is c called a structured programming language?