my teacher gave us this question and i am totally confused on what to do. any help would be greatly appreciated.

Explain what is happening in the pseudo code LOOP in one word. What is temp referring to, and what is the final output for this program:

input (12, 25, 11, 28, 14)

BEGIN

temp := a_1

for i = 2 to n

if temp < a_i then temp := a_i

END

print temp

thank you for any help on this problem

Explain what is happening in the pseudo code LOOP in one word. What is temp referring to, and what is the final output for this program:

input (12, 25, 11, 28, 14)

BEGIN

temp := a_1

for i = 2 to n

if temp < a_i then temp := a_i

END

print temp

thank you for any help on this problem

This question still have no answer summary yet.

Temp is a temporary variable.

Lets see. It reads the first value, stores it in temp1, then it reads the next variable, tests it to see if it is greater than the first variable, if so, it replaces it, if not it reads the next data, and so on.

It appears to me it returns the greatest value from the set of data.

Lets see. It reads the first value, stores it in temp1, then it reads the next variable, tests it to see if it is greater than the first variable, if so, it replaces it, if not it reads the next data, and so on.

It appears to me it returns the greatest value from the set of data.

Did this answer your question? If not, ask a new question.

- my teacher gave us this question and i am totally confused on what to do
my teacher gave us this question and i am totally confused on what to do...

- I'm confused about this math question my teacher gave us today
I'm confused about this math question my teacher gave us today...

- my teacher gave us some fraction problems for homework, but I'm confused about how to go about solving the problem
my teacher gave us some fraction problems for homework, but I'm confused about h...

- my teacher gave us some fraction problems for homework, but I'm confused about how to go about solving the problem
my teacher gave us some fraction problems for homework, but I'm confused about h...

- my teacher gave me this question I don't get it
my teacher gave me this question I don't get it...

- i have a problem with this question my teacher gave me
i have a problem with this question my teacher gave me...

- This question is not in the book, but one that my teacher gave us to try
This question is not in the book, but one that my teacher gave us to try...

- Hello my teacher gave us question and he said to find our from any where well Question is
Hello my teacher gave us question and he said to find our from any where well Qu...

- my teacher gave us a question that says: compute the correlation coefficient (r) between pace of life and happiness
my teacher gave us a question that says: compute the correlation coefficient (r)...

- I do not understand the assignment my teacher gave me if possible can you find me an article so i can do my presentation that meets the standards that my teacher wants
I do not understand the assignment my teacher gave me if possible can you find m...