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

Find the largest number from the given 2 numbers without using
any loops and the conditional operator.

Answer Posted / surya

if(!(a/b)) // if a is less than b then division result will be zero.
02
{
03
cout << " b is greater than a";
04
}
05
else if (!(a-b)) // we know a is greater than or equal to b now. check whether they are equal.
06
{
07
cout << "a and b are equal";
08
}
09
else
10
cout << "a is greater than b";

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between && and & in c?

1091


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1053


Differentiate between functions getch() and getche().

1032


What is the importance of c in your views?

1157


What are the types of operators in c?

1049


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2246


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1078


Explain the advantages of using macro in c language?

983


What is the auto keyword good for?

1131


what is uses of .net

1721


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2407


What is the difference between null pointer and wild pointer?

1179


What is advantage of pointer in c?

1168


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2630


What is a shell structure examples?

1076