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 14:30
Shania's test scores in 8 subjects were 88, 91, 85, 74, 69, 72, 80, and 87. shania found the middle number of her scores. which type of measure did she find?
Answers: 1
question
Mathematics, 21.06.2019 17:00
The area of a rectangle is 54x^9y^8 square yards.if the length of the rectangle is 6x^3y^4 yards,which expression represents the width of the rectangle in yards
Answers: 2
question
Mathematics, 21.06.2019 19:00
Lucy and donavan measured the length of the school garden. lucys measurement is 11.3m and donavans measurement is 113 cm. could both be correct? explain
Answers: 1
question
Mathematics, 21.06.2019 19:30
Acabinmaker buys 3.5 liters of oat varnish the varnish cost $4.95 per liter what is the total cost of 3.5 liters
Answers: 1
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
Chemistry, 12.05.2021 23:00
question
Mathematics, 12.05.2021 23:00
question
Mathematics, 12.05.2021 23:00
question
English, 12.05.2021 23:00
question
Mathematics, 12.05.2021 23:00
question
French, 12.05.2021 23:00
Questions on the website: 13722359