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

What do you mean by Encapsulation?

0 Answers   Ittiam Systems,


what isthe difference between c structure and c++ class

5 Answers  


What exactly is polymorphism?

0 Answers  


What is methods in oop?

0 Answers  


What is abstraction in oops?

0 Answers  






what is oops

4 Answers   NIIT,


What is overriding vs overloading?

0 Answers  


difference between structure and union.

2 Answers   ADP, Convergys,


what is pointers

7 Answers   Exilant,


What is the point of oop?

0 Answers  


Why u change company?

12 Answers   BOB Technologies,


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


Categories