Could you help me solve this question please thank you For e

Could you help me solve this question please? thank you

For each of the following decide whether you would use a loop, while loop a nested loop land if so what kind, e.g., a for loop inside of another for loop, a while loop inside of a for loop, etc, or no loop at all. DO NOT WRITE THE ACTUAL CODE. sum the integers 1 through 50:, add 3 to all numbers in a vector: prompt the user for a string and keep doing this until the string that the enters is a keyword in MATLAB: find the minimum in every column of a matrix: prompt the user for 5 numbers and find their sum: prompt the user for 10 numbers, find the average and also find how many of the numbers were greater than the average: generate a random integer n in the range from 10 to 20. Prompt the user for n positive numbers, error-checking to make sure you get n positive numbers (and just echo print each one): prompt the user for positive numbers until the user enters a negative number. Calculate and print the average of the positive numbers, or an error message if none are entered:

Solution

1) We can use a \'simple for loop\' that will iterate from 1 to 50 for this.

2)We can use a \'simple for loop\' that will iterate from 1 to length of vector for this.

3)we can use a \"while loop\" for this;

4)We can use a \'nested for loop\' for this. The outer loop will iterate through all columns and the inner loop will find minimum in every column.

Could you help me solve this question please? thank you For each of the following decide whether you would use a loop, while loop a nested loop land if so what

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site