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
What are the advantages of the functions?
What is the meaning of typedef struct in c?
State two uses of pointers in C?
Is stack a keyword in c?
What is the difference between malloc() and calloc() function in c language?
Can we declare variables anywhere in c?
How to declare a variable?
What is the use of getch ()?
Why isnt there a numbered, multi-level break statement to break out
Is null a keyword in c?
while initialization of array why we use a[][2] why not a[2][]...?
What are file streams?
What is C language ?
Can two or more operators such as and be combined in a single line of program code?
Explain what will the preprocessor do for a program?