0

Returning smallest value

write a code that takes 3 non-equal integers and returns the smallest

21st Oct 2017, 5:30 PM
Argwings Kipchirchir
Argwings Kipchirchir - avatar
1 Antwort
+ 1
Going by short // Using ? and : int x, y, z; int smallest = (x < y && x < z) ?x: ((y < z) ?y: z); cout<<smallest; // Output will be the smallest num
31st Oct 2017, 2:57 PM
#RahulVerma
#RahulVerma - avatar