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

Why it is called runtime polymorphism?

0 Answers  


what is object slicing?

9 Answers   L&T, Wipro,


What are the 3 pillars of oop?

0 Answers  


in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C

1 Answers   IonIdea,


what's the basic's in dot net

0 Answers   informatics,


20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?

5 Answers   IonIdea,


Out of 4 concepts, which 3 C++ Follow?

1 Answers   TCS,


why function overloading is not called as pure polymorphism?

2 Answers  


program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number

1 Answers   Anna University,


Please send ford technologies placement paper 2 my mail id

0 Answers  


Write a program to sort the number with different sorts in one program ??

0 Answers   NIIT,


What is multiple inheritance?

9 Answers   TCS,


Categories