+ 7

How to find maximum of three numbers without using & or max function in C++ ?

26th Sep 2017, 2:44 PM
Abhishek Tandon
Abhishek Tandon - avatar
3 Answers
+ 4
@Rahulverma you didn't read the question properly It says without using & operator
14th Nov 2017, 8:16 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 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
14th Nov 2017, 6:55 AM
#RahulVerma
#RahulVerma - avatar