Explain this please?
Mostrar comentarios más antiguos
x = 2;
e = 2.713;
c = 5 + (x < 2 || (e < pi));
c = 6
How does the value of c=6 after the code is executed? 2 is not less than 2, while e is not less than pi, so that is throwing me off. Thank you!
2 comentarios
Mil Shastri
el 14 de Oct. de 2019
e = 2.713
pi = 3.1416
thus, (e < pi) indeed is true
Walter Roberson
el 14 de Oct. de 2019
But e is less than pi. 2.713 < 3.14159265358979323 [etc]
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!