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 a constant?

1040


What is null in c?

1075


What is the purpose of type declarations?

1105


how should functions be apportioned among source files?

1089


What is the easiest sorting method to use?

1144


What are all different types of pointers in c?

1002


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1734


In a byte, what is the maximum decimal number that you can accommodate?

1123


Does c have function or method?

983


What is wrong with this program statement?

1024


Is exit(status) truly equivalent to returning the same status from main?

1054


Write a program to check whether a number is prime or not using c?

1040


Difference between linking and loading?

1089


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3344


What is the use of printf() and scanf() functions?

1114