Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses Compl;
- const n = 5;
- var a: array[1..n,1..n] of complex;
- i, j, k, m: integer;
- S1,S2,S: complex;
- begin
- Zero(S);
- k := 0;
- for i := 1 to n do
- begin
- for j := 1 to n do
- begin
- a[i,j].Re := random(4) + 1;
- a[i,j].Im := random(4) + 1;
- write(a[i,j].Re, '.', a[i,j].Im);
- write(' ')
- end;
- writeln;
- end;
- writeln;
- m := trunc((n+1)/2);
- for i := 1 to n do
- for j := 1 to m do
- begin
- Add(S,a[i,j],S);
- inc(k);
- end;
- Prod(1/k,S,S);
- Output(S);
- writeln
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement