Results 1 to 7 of 7
Thread: -
Hybrid View
-
1st December 2008 00:53 #1Registered User
Join Date: Nov:2008
Location: Sofia
Posts: 15
-
[M,M] , B[M,M] , C[M,M] (M<=20, M ) . :
-
-
- , ( )
.
:
Program Zad;
uses crt;
type
matrix=array[1..20,1..20] of real;
var
A,B,C:matrix;
M,I,J:integer;
MaxELA,MaxELB,MaxELC:real;
Procedure Inp(var D:matrix);
begin
write('vyvedete stoinost za M(<=20) ==> ');
readln(M);
for I:=1 to M do
for J:=1 to M do
begin
write('D[',I,','J,']= ');read(D[I,J]);
end;
end;
Procedure Otp(var D:matrix);
begin
for I:=1 to M do
begin
for J:=1 to M do write (D[I,J]:8:2);
writeln;
end;
end;
Function MaxSD(D:matrix):real;
var max:real;
begin
max:=D[1,M];
for I:=2 to M do if max<D[I,M-I+1] then max:=D[I,M-I+1];
writeln('maximalniqt element po vtorostepenniqt diagonal e: ',max:6:2);
MaxSD:=Max;
end;
begin
clrscr;
writeln('vyvedete stoinosti za A');
inp(A);
writeln('vyvedete stoinosti za B');
inp(B);
writeln('vyvedete stoinosti za C');
inp(C);
writeln('stoinostite za A sa: ');
otp(A);
MaxELA:=MaxSD(A);
writeln('stoinostite za B sa: ');
otp(B);
MaxELB:=MaxSD(B);
writeln('stoinostite za C sa: ');
otp(C);
MaxELC:=MaxSD(C);
readkey;
end.
, , , :S
-
1st December 2008 09:21 #2
-
1st December 2008 11:21 #3Registered User
Join Date: Nov:2008
Location: Sofia
Posts: 15
..
, ( ) ..
-
1st December 2008 11:39 #4
:
, - I M-I+1, :Code:writeln('maximalniqt element po vtorostepenniqt diagonal e: ',max:6:2);
( )Code:writeln('maximalniqt element po vtorostepenniqt diagonal e s indeksi: ', I, , ' i ', M-I+1, ' i stojnost: ',max:6:2);
-
1st December 2008 12:07 #5Registered User
Join Date: Nov:2008
Location: Sofia
Posts: 15
-
1st December 2008 12:23 #6
, , .
, 1, :
max, I .Code:for I:=2 to M do if max<D[I,M-I+1] then max:=D[I,M-I+1];
I .
-
1st December 2008 12:36 #7Registered User
Join Date: Nov:2008
Location: Sofia
Posts: 15
Last edited by CuST0M1z3; 1st December 2008 at 22:59.




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in