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 program to find the largest of two numbers without
using for,while,switch,if else, conditional operator and do
while using c++ pgmng language

Answers were Sorted based on User's Feedback



write a program to find the largest of two numbers without using for,while,switch,if else, conditi..

Answer / random

double largest(double x, double y){
return (x+y)/2. + abs(x-y)/2.;
}

Is This Answer Correct ?    28 Yes 9 No

write a program to find the largest of two numbers without using for,while,switch,if else, conditi..

Answer / vishal sharma

double largeone(double a,double b)
{
return(((a+b)/2) + ((a-b)/2));
}

Is This Answer Correct ?    9 Yes 2 No

write a program to find the largest of two numbers without using for,while,switch,if else, conditi..

Answer / swaroop

int max,a,b;
max = (a>b)? a:b ;

Is This Answer Correct ?    8 Yes 10 No

Post New Answer

More OOPS Interview Questions

When is it necessary to use member-wise initialization list in C++?

2 Answers   Adobe,


what is the realstic modeling?

1 Answers  


What is a class oop?

0 Answers  


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

0 Answers  


design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }

1 Answers   HSBC,


What are the access specifiers avaible in c++?

4 Answers  


C#.net Interview Question A=10 B=5 C=A+B Print C The above will be given in a multiline textbox. You need to parse the above input, store values for A,B&c. And you have to display the value of C.

1 Answers   Syncfusion,


what is the difference between ERROR and EXCEPTION?

14 Answers   NIIT, nvidia,


what is virtual function in c++

6 Answers  


Give two or more real cenario of virtual function and vertual object

0 Answers   TCS,


What is difference between function overloading and overriding?

1 Answers   emc2,


What is late bound function call and early bound function call? Differentiate.

2 Answers   Ness Technologies,


Categories