if (a> b) if (a> c) g=a; else g=c; if (b> c) g=b; else g=c; | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

if (a> b) if (a> c) g=a; else g=c; if (b> c) g=b; else g=c;

how to write the following statement using ternary operator or boolean

27th Aug 2016, 1:40 AM
chashni1208
1 Resposta
+ 2
g = a > b ? (a > c ? a : c) : (b > c ? b : c) ;
27th Aug 2016, 3:03 AM
sreeraj g
sreeraj g - avatar