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 is the use of ?: Operator?
How are variables declared in c?
How many loops are there in c?
How do you define structure?
How can I get back to the interactive keyboard if stdin is redirected?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is the purpose of macro in C language?
What is malloc() function?
What is the size of a union variable?
What is structure padding in c?
The difference between printf and fprintf is ?
What is unsigned int in c?
Explain union.
Explain bitwise shift operators?
What are inbuilt functions in c?