Given an array of 50 numbers. From 0 to 50. You need to write a program so that the user enters any 5 digits

Given an array of 50 numbers. From 0 to 50. You need to write a program so that the user enters any 5 digits from 0 to 50 and the program finds the smallest number out of five. Also carry out the operation with any 26 digits. Language – Pascal.

var a: array [0..50] of integer;

for b: array [1..5] of integer;

c: array [1..26] of integer;

i, bmin, cmin: integer;

begin

for i: = 0 to 50 do a [i]: = i;

writeln (‘Enter 5 numbers’);

for i: = 1 to 5 do readln (b [i]);

if (b [1] <= 50) and (b [1]> = 0) then (if b [2] <= 50) and (b [2]> = 0) then

if (b [3] <= 50) and (b [3]> = 0) then if (b [4] <= 50) and (b [4]> = 0) then

if (b [5] <= 50) and (b [5]> = 0) then begin

bmin: = b [1];

for i: = 2 to 5 do begin

if bmin> a [i] then bmin: = a [i];

end;

writeln (‘Enter 26 numbers’);

for i: = 1 to 26 do readln c [i];

cmin: = c [1];

for i: = 2 to 5 do begin

if cmin> a [i] then cmin: = a [i];

end;

writeln (bmin, cmin);

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.