Write a C program to find the smallest of three integers,
without using any of the comparision operators.
Answer Posted / niranjan
main()
{
int a=5,b=2,c=3; /*Assuming a Use Case */
int d; /* d is required a temporary variable */
if(!(a/b)&& !(a/c))
{
d = a; /* Which means a is small */
}
else if ( !(b/a)&&!(b/c))
{
d = b; /* Which means b is small */
}
else
{
d = c;
}
printf("%d",d);
}
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What does 4d mean in c?
Which are low level languages?
What is volatile c?
Can you write a programmer for FACTORIAL using recursion?
Why does not c have an exponentiation operator?
write a progrmm in c language take user interface generate table using for loop?
What is string concatenation in c?
What is n in c?
What is data structure in c programming?
Which programming language is best for getting job 2020?
Write a Program to find whether the given number or string is palindrome.
Can we use visual studio for c?
code for replace tabs with equivalent number of blanks
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What is p in text message?