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

Помогите решить)Паскаль 9 класс!Задания во вложениях!!

  1. Ответ
    Ответ дан emblerik

    var

      a, b, c, m : integer;

    begin

      read (a, b, c);

      m := a;

      if b < m then m := b;

      if c < m then m := c;

      writeln (m);

    end.

     

    var

      a : array [1..3] of integer;

      i, m : integer;

    begin

      m := a[1];

      for i := 2 to 3 do

        if a[i] < m then m := a[i];

      writeln (m);

    end.

     

    var

      a, b, c : integer;

    begin

      read (a, b, c);

      if (a <= b) and (a <= c) then writeln (a)

      else if (b <= c) and (b <= a)  then writeln (b)

      else writeln (c);

    end.

     

    __________________________________

     

    var

      a, b, c : integer;

     

    procedure swap (var a, b : integer); 
    var

      c : integer; 
    begin 
      c := a; 
      a := b; 
      b := c; 
    end; 

    begin

      read (a, b, c);
      if a > b then swap (a,b); 
      if a > c then swap (a,c); 
      if b > c then swap (b,c);

       write (a, ' ', b, ' ', c);
    end.

    _____________________________________________

     

    var

      a, b, c : real;

      d, x1, x2 : real;

     

    begin

      read (a, b, c);

      d := sqr (b) - 4 * a * c;

      if d < 0 then writeln ('Корней нет')

      else

      begin

        x1 := (-b + sqrt (d)) / (2 * a);

        x2 := (-b - sqrt (d)) / (2 * a);

       if d = 0 then writeln ('x = ', x1)

       else writeln ('x1 = ', x2, ';  x2 = ', x1);

      end;

    end.

Самые новые вопросы