Quipex icon

четвёртое

Quipex | PRO | 04/26/16 11:04:04 AM UTC | 0 ⭐ | 7603 👁️ | Never ⏰ | []
Pascal |

490 B

|

None

|

0 👍

/

0 👎

Begin
  var arr: array[1..4,1..2] of double;
  var s, sum: double;
  sum := 0;
  writeln('Vvedite matricu: ');
  
  var i,j, count:integer;
  count := 0;
  for i := 1 to 4 do
    for j := 1 to 2 do
      if j = 2 then
      begin
        readln(arr[i,j]);
        if arr[i,j] < 0 then
          begin
            sum := sum + arr[i,j];
            count := count + 1;
          end;
      end
      else
        read(arr[i,j]);
  s := sum / count;
  writeln('S = ',s:5:2)
End.

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎