N
N
Nikita Koshik2021-04-06 20:03:58
Pascal
Nikita Koshik, 2021-04-06 20:03:58

How to solve these problems?

1) How should this fragment be changed so that it determines the smallest value of the elements of the table value
max:=a[1];
for i : = 2 to 10 do If a[i] > max Then max : = a[i];

2) If several elements in a table value have the highest value among the values ​​of all elements of this table value, then the fragment max:=a[1]; for i : = 2 to 10 do If a[i] > max Then max : = a[i]; determines which one is the
largest? Will something change if the > sign in the
branch is changed to the > = sign?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2021-04-06
@HemulGM

"<" - less than
"<=" - less or early
">" - greater than
">=" - greater than or equal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question