Write a program to find minimum between three no.s whithout
using comparison operator.
Answer Posted / ashutosh tiwari
if((a-b)&0x8000)
if((a-c)&0x8000)
printf("a is smaller");
else if((a-c)&0x7fff)
printf("c is smaller");
else
printf("a & c are equal & smaller");
else if((a-b)&0x7fff)
if((b-c)&0x8000)
printf("b is smaller");
else if((b-c)&0x7fff)
printf("c is smaller");
else
printf("b & c are equal & smaller");
else
if((b-c)&0x8000)
printf("b is smaller");
else if((b-c)&0x7fff)
printf("c is smaller");
else
printf("a, b & c are equal & smaller");
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Does free set pointer to null?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is table lookup in c?
What is the c value paradox and how is it explained?
Can we access array using pointer in c language?
How can you allocate arrays or structures bigger than 64K?
What are the functions to open and close the file in c language?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Is there any data type in c with variable size?
Write a Program to accept different goods with the number, price and date of purchase and display them
What 'lex' does?
What are keywords in c with examples?
What are the different file extensions involved when programming in C?
develop algorithms to add polynomials (i) in one variable