Advertisement
destr0y

Lab1_2

Mar 13th, 2020
3,364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var a := new List<List<integer>>;
  2. begin
  3.   for var i := 1 to 5 do
  4.   begin
  5.     var b := new List<integer>();
  6.     for var j := 1 to 5 do
  7.         b.Add(random(-50,50));
  8.     a.Add(b);
  9.   end;
  10.  
  11.   writeln(a);
  12.  
  13.   var index: integer;
  14.   write('Введите номер строки: ');
  15.   readln(index);
  16.  
  17.   writeln('Введите строку: ');
  18.   var c := new List<integer>;
  19.   for var i := 1 to 5 do
  20.   begin
  21.     var temp: integer;
  22.     read(temp);
  23.     c.Add(temp);
  24.   end;
  25.  
  26.   a.Insert(index - 1, c);
  27.  
  28.   writeln(a);
  29. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement