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 dangling pointers? How are dangling pointers different from memory leaks?
What are the rules for identifiers in c?
Explain the use of 'auto' keyword in c programming?
How does struct work in c?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
what is the diffrenet bettwen HTTP and internet protocol
How can I get the current date or time of day in a c program?
Are comments included during the compilation stage and placed in the EXE file as well?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Is c procedural or object oriented?
What is a loop?
Is r written in c?
Can i use “int” data type to store the value 32768? Why?
Explain what is the difference between #include and #include 'file' ?