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

how to find out the maximum number out of the three inputs.

Answer Posted / pavan mustyala

//Single statement code using ternary operator

int max(int a, int b, int c)
{
return (((a > b) ? a : b) > c) ? ((a > b) ? a : b) : c;
}

Is This Answer Correct ?    14 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to write a program that opens a file and display in reverse order?

3064


i don't know about working of nested for loop can any one help me

2275


write a program to convert temperature from fa height into celcius and vise versa,use modular programming

3020


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

3760


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

5121


Write a simple encryption program using string function which apply the substitution method.

6123


Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)

4989


How to Split Strings with Regex in Managed C++ Applications?

3677


write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n

2860


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2513


write a program that reads a series of strings and prints only those strings begging with letter "b"

3122


write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150

3772


How to swap two ASCII numbers?

3044


Code for Method of Handling Factorials of Any Size?

2486


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

3237