+ 7
How to find maximum of three numbers without using & or max function in C++ ?
3 Answers
+ 4
@Rahulverma
you didn't read the question properly
It says without using & operator
+ 2
Going by short
// Using ? and :
int x, y, z;
// Here, max isn't a function
int max = (x > y && x > z) ?x: ((y > z) ?y: z);
cout<<max;
// Output will be the greatest num