profile
Опубликовано 5 лет назад по предмету Информатика от katya5674

Тема "Массивы" 10 класс
Друзья я ноль в информатике, помогите пожалуйста.
Буду очень благодарна. :)

  1. Ответ
    Ответ дан Mepkypuu
    4)var i,min,max,count,j:integer;
    a:array[1..40] of integer;
    begin
    min:=500;
    max:=10;
    for i:=1 to 40 do
    a[i]:=random(10,500);
    for i:=1 to 40 do
    begin
    if a[i]>max then
    max:=a[i];
    if a[i]<min then
    begin
    min:=a[i];
    count:=i;
    end;
    for j:= 1 to 40 do
    if (i<>j) and (a[i]=a[j]) then
    writeln('Элементы',i,'и',j,'содержат число',a[i])
    end;
    writeln('Самое большое числа',max);
    writeln('Номер самого маленького числа',count);
    end.
    5)
    var i,j:integer;
    k:real;
    a:array[1..10] of real;
    begin
    writeln('Пункт a');
    for i:= 1 to 10 do
    begin
    a[i]:=sin(i/10)*30;
    writeln(a[i]);
    end;
    writeln('Пункт b');
    for i:= 1 to 9 do
    for j:=1 to 10-i do
    if a[j]>a[j+1] then
    begin
    k:=a[j];
    a[j] := a[j+1];
    a[j+1]:= k;
    end;
    for i := 1 to 10 do
    writeln(a[i]);
    writeln('Пункт c');
    for i := 1 to 10 do
    if i mod 3 <>0 then 
    writeln(a[i])
    else if i mod 3 = 0 then
    begin
    a[i]:=a[i]*7;
    writeln(a[i]);
    end;
    writeln('Пункт d');
    for i:=1 to 10 do
    for j:=1 to 10 do
    if a[i]>a[j] then
    swap(a[i],a[j]);
    for j := 1 to 10 do
    writeln(a[j]);
    writeln('Пункт e');
    for j:= 1 to 10 do
    writeln(round(a[j]*100)/100);
    end.
    1. Ответ
      Ответ дан katya5674
      Спасибо большое )
      Очень выручаете ^^
    2. Ответ
      Ответ дан Mepkypuu
      Вот 6 задание
    3. Ответ
      Ответ дан Mepkypuu
      var i,k,count,prost,j:integer;
      a:array[1..60] of integer;
      b:array[1..60] of integer;
      begin
      for i:= 1 to 60 do
      a[i]:=random(-10,60);
      writeln('Пункт a');
      for i:= 1 to 60 do
      begin
      count:=0;
      if a[i]>0 then
      for k:= 1 to a[i] do
      if a[i] mod k = 0 then
      if (a[i] div k = 1) or (a[i] div k = a[i])then
      count:= count+1
      else
      count:=3;
      if count=2 then
      prost:=prost+1
      else if a[i]<0 then
    4. Ответ
      Ответ дан Mepkypuu
      begin
      for k:= -1 downto a[i] do
      if k<>0 then
      if a[i] mod k = 0 then
      if (a[i] div k = 1) or (a[i] div k = -a[i])then
      count:= count+1
      else
      count:=3;
      if count=2 then
      prost:=prost+1;
      end;
      end;
      writeln('количество',prost);
      end.
Самые новые вопросы