biggest of two no's with out using if condition statement
Answer Posted / k.anand
#define myabs(a,b) a>b?(a-b):(b-a)
int main()
{
int a,b;
int biggest=0;
scanf("%d%d",&a,&b);
biggest=(a+b+myabs(a,b))/2;
printf("%d",biggest);
}
| Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
What does int main () mean?
how we can make 3d venturing graphics on outer interface
What are the two forms of #include directive?
What is the condition that is applied with ?: Operator?
How to compare array with pointer in c?
What are the functions to open and close the file in c language?
Discuss the function of conditional operator, size of operator and comma operator with examples.
Why is main function so important?
What is a keyword?
What 'lex' does?
What happens if a header file is included twice?
how logic is used
What does a pointer variable always consist of?
what is the height of tree if leaf node is at level 3. please explain
What is a string?