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...

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


Please Help Members By Posting Answers For Below Questions

What is the use of ?: Operator?

1184


How are variables declared in c?

1150


How many loops are there in c?

1163


How do you define structure?

1091


How can I get back to the interactive keyboard if stdin is redirected?

1234


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

1322


What is the purpose of macro in C language?

1162


What is malloc() function?

1233


What is the size of a union variable?

1098


What is structure padding in c?

1187


The difference between printf and fprintf is ?

1343


What is unsigned int in c?

1054


Explain union.

1238


Explain bitwise shift operators?

1316


What are inbuilt functions in c?

1080