Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
Advertisement