konstantinslivkov
?>

Опишите что здесь происходит? Private Sub OptionButton1_Click() For i = 1 To 10000 Cells(i, 5) = "" If Cells(i, 1) = "" Then n = i - 1 Exit For End If Next i For i = 2 To n For j = i + 1 To n If Cells(i, 4) < Cells(j, 4) Then t = Cells(i, 1) Cells(i, 1) = Cells(j, 1) Cells(j, 1) = t t1 = Cells(i, 2) Cells(i, 2) = Cells(j, 2) Cells(j, 2) = t1 t2 = Cells(i, 3) Cells(i, 3) = Cells(j, 3) Cells(j, 3) = t2 t3 = Cells(i, 4) Cells(i, 4) = Cells(j, 4) Cells(j, 4) = t3 End If Next j Next i End Sub

Информатика

Ответы

sadinuraliev263
Var a:array[1..100,1..100] of integer; i,j,n,m,max,min:integer; begin write ('Введите количество строк: '); read(n); writeln; write ('Введите количество элементов в строке: '); read(m); writeln; writeln('Введите массив: '); for i:=1 to n do begin for j:=1 to m do begin write(' a[',i,',',j,']='); read(a[i,j]); end; writeln; end; writeln; writeln('Исходный массив: '); for i:=1 to n do begin for j:=1 to m do write(a[i,j],' '); writeln; end; writeln; writeln('Конечный массив: '); for i:=1 to n do begin min:=a[i,1]; max:=a[i,1]; for j:=2 to m do begin if (min>a[i,j]) then min:=a[i,j]; if (max
info9
// PascalABC.Net 3.0, сборка 1066
var
  s, wd: string;
  n, pt: integer;

begin
  Write('Введите строку: ');Readln(s);
  n := Length(s); pt := 1;
  repeat
    // Пропускаем все символы до первого непробельного
    while pt <= n do
      if s[pt] = ' ' then Inc(pt) else break;
    if pt <= n then begin
      // Выделяем очередное слово
      wd := '';
      while pt <= n do
        if s[pt] <> ' ' then begin wd := wd + s[pt]; Inc(pt) end
        else break;
      if (wd <> '') and (LowCase(wd[1]) in ['м'..'я']) then Writeln(wd)
    end
  until pt > n;
end.

Тестовое решение:
Введите строку: **А роза    упала   на    лапу Азора    **
роза
упала
на

А вот так версия 3.0 позволяет решить задачу "по-современному":

// PascalABC.Net 3.0, сборка 1066
begin
  var s:=ReadString('Введите строку: ');
  Writeln('Результат: ',s.ToWords(' ').Where(x->x[1] in ['м'..'я']))
end.

Тестовое решение:
Введите строку:  **А роза    упала   на    лапу Азора    **
Результат: [роза,упала,на]

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Опишите что здесь происходит? Private Sub OptionButton1_Click() For i = 1 To 10000 Cells(i, 5) = "" If Cells(i, 1) = "" Then n = i - 1 Exit For End If Next i For i = 2 To n For j = i + 1 To n If Cells(i, 4) < Cells(j, 4) Then t = Cells(i, 1) Cells(i, 1) = Cells(j, 1) Cells(j, 1) = t t1 = Cells(i, 2) Cells(i, 2) = Cells(j, 2) Cells(j, 2) = t1 t2 = Cells(i, 3) Cells(i, 3) = Cells(j, 3) Cells(j, 3) = t2 t3 = Cells(i, 4) Cells(i, 4) = Cells(j, 4) Cells(j, 4) = t3 End If Next j Next i End Sub
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

Анатольевич-Фатима
melissa-80
annatarabaeva863
Arzieva Abdulmanov1438
lzelenyi5
Stefanidi_Semeikina1896
klodialeit36
Milovidova
ДеречинскийИрина1149
Синформатикой (определить значение z)
tanyashevvvv
Dmitrievna-Dmitrii980
andre6807
bakerkirill
Larisa-Andrei
dshi67orbru