Explain this please?
이전 댓글 표시
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
Mil Shastri
2019년 10월 14일
e = 2.713
pi = 3.1416
thus, (e < pi) indeed is true
Walter Roberson
2019년 10월 14일
But e is less than pi. 2.713 < 3.14159265358979323 [etc]
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!