Write a program in pascal. using a repeat … until loop. Determine the minimum number from the sequence

Write a program in pascal. using a repeat … until loop. Determine the minimum number from the sequence of positive numbers entered from the keyboard, the entry ends with a negative number.

var
a, b, min: integer; // declare variables of integer type.
begin
writeln (‘enter a sequence of numbers, the end of the entry is a negative number:’);
readln (min); // read the first value of the sequence and consider it the minimum.
repeat // start of the cycle.
readln (a); // read the value entered from the keyboard.
if ((a <min) and (a> = 0)) then // compare the value with the minimum.
min: = a; // write the number to min.
until a <0; // exit the loop if a negative number is entered.
write (‘The minimum number from the entered sequence is:’, min); // line output.
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.