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


Please Help Members By Posting Answers For Below Questions

What are the advantages of the functions?

864


What is the meaning of typedef struct in c?

805


State two uses of pointers in C?

824


Is stack a keyword in c?

836


What is the difference between malloc() and calloc() function in c language?

829


Can we declare variables anywhere in c?

764


How to declare a variable?

768


What is the use of getch ()?

840


Why isnt there a numbered, multi-level break statement to break out

814


Is null a keyword in c?

934


while initialization of array why we use a[][2] why not a[2][]...?

2097


What are file streams?

774


What is C language ?

1719


Can two or more operators such as and be combined in a single line of program code?

1115


Explain what will the preprocessor do for a program?

803