How do I use an "if" statement to determine the highest input value?

조회 수: 1 (최근 30일)
Jason
Jason 2023년 10월 2일
댓글: Dyuman Joshi 2023년 10월 2일
I'm doing a project and it requires the user to state how many books they are buying and the price of each book. However, one of the remarks is that the buyer would be able to apply a discount to their most expensive book.
I need to use an "if" statement to determine the highest value from the inputs.
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 10월 2일
As Alan Stevens has mentioned, take a look at the documentation - if, elseif, else
If you still have any doubts/queries/problems, show the code you have attempted to solve the problem and specify where you are having trouble.

댓글을 달려면 로그인하십시오.

답변 (1개)

Alan Stevens
Alan Stevens 2023년 10월 2일

카테고리

Help CenterFile Exchange에서 Price and Analyze Financial Instruments에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by