subject
Mathematics, 28.08.2021 01:00 kimhayleeshook50

It is good programming style to always use a for loop when the number of times to repeat the action is known. The following code uses a while loop that mimics what a for loop should do. Rewrite it using a for loop that accomplishes exactly the same thing. myprod = 1;
i = 1;
while i <= 4
num = input('Enter a number: ');
myprod = myprod ⁎ num;
i = i + 1;
end

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 20:20
Recall that the owner of a local health food store recently started a new ad campaign to attract more business and wants to know if average daily sales have increased. historically average daily sales were approximately $2,700. the upper bound of the 95% range of likely sample means for this one-sided test is approximately $2,843.44. if the owner took a random sample of forty-five days and found that daily average sales were now $2,984, what can she conclude at the 95% confidence level?
Answers: 1
question
Mathematics, 21.06.2019 23:00
If a company produces x units of an item at a cost of $35 apiece the function c=35x is a of the total production costs
Answers: 2
question
Mathematics, 21.06.2019 23:30
What is the area of a triangle with a base of 7x and height of 8x expressed as a monomial? question 5 options: 1x 15x2 28x2 56x2
Answers: 1
question
Mathematics, 22.06.2019 01:00
Find the percent error of the measurement 4 cm
Answers: 3
You know the right answer?
It is good programming style to always use a for loop when the number of times to repeat the action...
Questions
question
Mathematics, 18.10.2020 05:01
question
Biology, 18.10.2020 05:01
question
Mathematics, 18.10.2020 05:01
Questions on the website: 13722360