Which of the following pieces of code will loop exactly 3 times ?1. for i=1:3 disp(i)> end 2. for i=2:5 disp(i) end 3. for i = 2:4 disp(i) end 4. for i=10:8:-1 disp(i) end

🎲 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 will loop exactly 3 times ?<br>1. for i=1:3 <br/> disp(i)> end <br/> <br> 2. for i=2:5 <br/>disp(i) end 3. for i = 2:4 disp(i) end 4. for i=10:8:-1 disp(i) end