Question: Conditionals Part 2 Let's do another cenditional using this nested if - end structure. There is one short segments of code in the Leamer Template
Conditionals Part
Let's do another cenditional using this "nested ifend" structure. There is one short segments of code in the Leamer Template to set up numsvec as a random row vector.
Write a nested if end statement based off this criteria:
Evaluate if the first element of numsvec is greater than
If it is then check if first element of numsvec is less than
If it is greater than and less than satisfying both the conditions above subtract from the first element of numsvec, saving this new value to that first element of
numsvec.
Then, set a variable called isoneorten to
Now, write a switch case based off this criteria:
In the case that the first element of numsvec is set isoneorten to
In the case that the first element of numsvec is set isoneorten to
Note:
Don't change anything in the first lines.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
