Compiling to code lazarus / 9-Editor ---------------------------------------------------------------------- Sneg · 2020-11-12 23:03 Hi, all. The first week I study lazarus and immediately give it is not clear what, I decided to contact you. The task: Find the difference R between the maximum and minimum elements of the array W: https://imgur.com/BXwwbL7 Sorry for the picture on a third-party resource, I did not understand how to insert it on the site. ---------------------------------------------------------------------- winni · 2020-11-13 01:10 Hi! You know how to create a project and to put a button on a form? Do it and put this code in the empty body of the procedure Button1Click Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);const matrix : Array[1..3,1..3] of integer = (                        (-1, -6, -8),                      (24, 15, 13),                        (-7, 73 ,-2)   );var x,y : integer;    min: integer = 0;    max: integer = 0;begin   for x := 1 to 3 do      begin        for y := 1 to 3 do           begin          if matrix[x,y] < min  then min := matrix[x,y];            if matrix[x,y] > max then max := matrix[x,y];           end; // y        end; //x showMessage ('min: '+IntToStr(min)+ ' / '+'max: '+IntToStr(max) );end; Winni ---------------------------------------------------------------------- Sneg · 2020-11-13 22:53 winni, thank you very much, but could you please add some code and find the difference between the maximum number and the minimum. ---------------------------------------------------------------------- winni · 2020-11-14 02:30 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i showMessage ('min: '+IntToStr(min)+ ' / '+'max: '+IntToStr(max)  +LineEnding+'Difference min max: '+IntToStr(max - min)    );   Homework now done?? Winni