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

write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1850


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1432


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1629


What is the process to create increment and decrement stamen in c?

590


What is %lu in c?

689






Difference between macros and inline functions? Can a function be forced as inline?

716


What is #define?

578


What is the use of getchar() function?

634


What is the advantage of an array over individual variables?

746


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1500


What is the use of pragma in embedded c?

594


What are identifiers c?

569


Find MAXIMUM of three distinct integers using a single C statement

628


Mention four important string handling functions in c languages .

634


What is the c value paradox and how is it explained?

579