# Turbo Pascal: the first number in the array is smaller than the others?

Please help me write a program for turbo pascal using an array. There is a one-dimensional array of whole random numbers consisting of `N=20` elements. The program should answer the question: “Is it true that the first number is less than the others?

` `Program L15; var a,b,c,d:integer; begin writeln('Введите 4 числа'); readln(a,b,c,d); if ( (a<b) and (a<c) and (a<d) ) then writeln('Да') else writeln('Нет'); end.` `

the rest through for, while, repeat.

• Are you going to write all 20 elements through a, b, c, d ...? what would you suggest, you must at least have basic concepts. An array is a separate data type, not a comma-separated variable. I do not like to send there but, bit.ly/Vfm5sc - Gedweb

` `Program L15; var m:array [1..20] of integer; i:integer; f:Boolean; begin f:=true; for i:=1 to 20 do begin writeln('Введите числo #'+IntToStr(i)); readln(m[i]); end; for i:=2 to 20 do begin if m>m[i] then f:=False; end; if f then writeln('Да первое число меньше остальных') else writeln('Нет, первое число не меньше остальных'); end.` `