7. Write a small programme, using a for loop and the disp() command, to display the value of the loop variable each time you go through the loop, where the loop variable goes from 5 to 17 inclusive....


7. Write a small programme, using a for loop and the disp() command, to display the<br>value of the loop variable each time you go through the loop, where the loop variable<br>goes from 5 to 17 inclusive.<br>8. Write a for loop which adds up all of the cubes of the odd integers between 200 and<br>800. Only display the final answer.<br>Include a simple check that your programme is working properly, by duplicating<br>the code but only adding up the first three terms in the sum. Because you are dealing<br>with only a few terms you can also get an answer by hand, or calculator, or Matlab,<br>to see if this program gives the correct answer. If your loop is working properly you<br>only then need to change the upper limit of the loop to get the final answer. Note:<br>you will need to display your answers in long format.<br>

Extracted text: 7. Write a small programme, using a for loop and the disp() command, to display the value of the loop variable each time you go through the loop, where the loop variable goes from 5 to 17 inclusive. 8. Write a for loop which adds up all of the cubes of the odd integers between 200 and 800. Only display the final answer. Include a simple check that your programme is working properly, by duplicating the code but only adding up the first three terms in the sum. Because you are dealing with only a few terms you can also get an answer by hand, or calculator, or Matlab, to see if this program gives the correct answer. If your loop is working properly you only then need to change the upper limit of the loop to get the final answer. Note: you will need to display your answers in long format.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here