Javatpoint Logo
Javatpoint Logo

MATLAB nested if-else

  • If statements can be nested, but each if statement requires the end keyword.

Syntax:

Example1

Output:

enter a number greater than 1 and less than 10: 9
a = 9
the random number is: 14
the random number is not divisible by the entered number

Example 2:


Next Topic#





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA