»
| | | | | |

» , : |
    
    
        
  [ ]
» " " «


<< >>

: paradise, KMA
  

MAKSIMUS69




: . :
[CODE=pas] program Zadanie3_Massiv;
uses crt;
const n=3;
type mtr=array[1..n,1..n] of real;

const A:mtr=((0.0,8.5,-1.3),(0.0,5.41,0.0),(9.0,-6.1,0.0));
var A1:mtr;
S1, S2: Real;
i, j: Integer;
begin
Writeln(' ');
for i := 1 to n do
begin
for j := 1 to n do
Write(A[i, j]: 6: 2);
WriteLn
end;
S1 := 0;
S2 := 0;
for i := 1 to n do
for j := 1 to n do
if i<j then S1 := S1 + A[i, j]
else if i>j then S2 := S2 + A[i, j];
WriteLn(' , =', S1: 5: 1);
WriteLn(' , =', S2: 5: 1);
WriteLn;
WriteLN(' ');
A1:=A;
IF S1=S2 THEN
for i := 1 to n do
begin
for j := 1 to n do
Write(A[i, j]: 6: 2);
WriteLN
end;
if S1>S2 THEN
for i := 1 to n do
begin
for j := 1 to n do
begin
if i>j then A1[i,j]:=abs(A[i,j]);
write(A1[i,j]: 6: 2);
end;
WriteLN;
end;
if S1<S2 THEN
for i := 1 to n do
begin
for j := 1 to n do
begin
if i<j then A1[i,j]:=Abs(A[i, j]);
write(A1[i,j]: 6: 2);
END;
begin
WriteLN(':');
For i:=1 To n Do
Write (A1[i,i], ' ');
end;
end;
END.

[/CODE]

-----

: 1 | : 2013 | : 12 . 2013 13:22 | IP

:
  ?
  ?

HTML

IkonCode

?
e-mail?
?
?  
 


<< >>

© Ikonboard.com