Results 1 to 7 of 7

Thread: -

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered 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

  2. #2
    Wall-e delian's Avatar
    Join Date: May:2003
    Location: ::1
    Posts: 4,723
    Quote Originally Posted by CuST0M1z3 View Post
    ... , , ...
    :
    Code:
    write('vyvedete stoinost za M(<=20) ==> ');
    readln(M);
    Inp :
    Code:
    writeln('vyvedete stoinosti za A');
    .

  3. #3
    Registered User
    Join Date: Nov:2008
    Location: Sofia
    Posts: 15
    ..
    , ( ) ..

  4. #4
    Wall-e delian's Avatar
    Join Date: May:2003
    Location: ::1
    Posts: 4,723
    :
    Code:
    writeln('maximalniqt element po vtorostepenniqt diagonal e: ',max:6:2);
    , - I M-I+1, :

    Code:
    writeln('maximalniqt element po vtorostepenniqt diagonal e s indeksi: ', I, , ' i ', M-I+1, ' i stojnost: ',max:6:2);
    ( )

  5. #5
    Registered User
    Join Date: Nov:2008
    Location: Sofia
    Posts: 15
    Quote Originally Posted by delian View Post
    :
    Code:
    writeln('maximalniqt element po vtorostepenniqt diagonal e: ',max:6:2);
    , - I M-I+1, :

    Code:
    writeln('maximalniqt element po vtorostepenniqt diagonal e s indeksi: ', I, , ' i ', M-I+1, ' i stojnost: ',max:6:2);
    ( )
    2 1 , 1 2 :S

  6. #6
    Wall-e delian's Avatar
    Join Date: May:2003
    Location: ::1
    Posts: 4,723
    , , .
    , 1, :

    Code:
    for I:=2 to M do if max<D[I,M-I+1] then max:=D[I,M-I+1];
    max, I .

    I .

  7. #7
    Registered User
    Join Date: Nov:2008
    Location: Sofia
    Posts: 15
    Last edited by CuST0M1z3; 1st December 2008 at 22:59.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |