Which of the following pieces of code in Scilab are functionally equivalent? >1. for i=1:7 disp(i-1,i,i+1) end2. for i=1:8 disp (i-2, i-1,i) end3. i=1 while (i

🎲 Try a Random Question  |  Total Questions in Quiz: 64  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
ME101: Final Exam - Introduction to Mechanical Engineering — practice the complete quiz, review flashcards, or try a random question.

MCQs on the basics of Mechanical Engineering.


Which of the following pieces of code in Scilab are functionally equivalent? <br>>1. for i=1:7 <br> disp(i-1,i,i+1) <br> end<br/><br>2. for i=1:8<br> disp (i-2, i-1,i)<br> end<br/><br>3. i=1 <br> while (i<=7)<br> disp (i-1, i, i+1)<br> end<br/><br>4. i=1<br> If (i<= 7)<br> disp (i-1, i, i+1) <br> i=i+1<br> end