Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What does 4d mean in c?

1561


Which are low level languages?

1152


What is volatile c?

1090


Can you write a programmer for FACTORIAL using recursion?

1101


Why does not c have an exponentiation operator?

1119


write a progrmm in c language take user interface generate table using for loop?

2103


What is string concatenation in c?

1139


What is n in c?

1114


What is data structure in c programming?

1132


Which programming language is best for getting job 2020?

1101


Write a Program to find whether the given number or string is palindrome.

1342


Can we use visual studio for c?

1162


code for replace tabs with equivalent number of blanks

2216


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

1120


What is p in text message?

1039