Results 1 to 4 of 4

Thread: Pascal -

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Dec:2008
    Location: Sofiq
    Posts: 2

    Pascal -

    ...

    3 [M,N], B[M,N], C[M,N] (M<=20, N<=20 M N ) . 3 :
    -
    -
    - -
    .

  2. #2
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    , , .

    . 2020. , - ( , -).
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  3. #3
    Registered User
    Join Date: Dec:2008
    Location: Sofiq
    Posts: 2

    Pascal

    , ,

    3 [M,N], B[M,N], C[M,N] (M<=20, N<=20 M N ) . 3 :
    -
    -
    - -
    .

    ...

    CODE
    program var5(Input,Output);
    const
    max=20;
    type
    Matrix=array[1..20,1..20] of Real;
    var
    A,B,C:Matrix;
    m,n:integer;

    procedure Inp(var E:Matrix; name: char);
    var
    i,j:integer;
    begin
    for i:=1 to m do
    for j:=1 to n do
    begin
    write(name,'[',i,',',j,']=');
    readln(E[i,j]);
    end;
    end;
    procedure Sortcolumn(var E:Matrix);
    var
    i,j,b,col:integer;
    F:Boolean;
    max:Real;
    begin
    col:=1;
    max:=E[1,1];
    for j:1 to m do
    begin
    repeat
    F:=True;
    for i:=1 to n-1 do
    if(E[i,j]<E[i+1,j]) then
    begin
    b:=E[i,j];
    E[i,j]:=E[i+1,j];
    E[i+1,j]:=b;
    F:False;
    end;
    until F:=True;
    write(E[i,j]:6:2);
    write('Kolonkata s nai-malyk po stoinost minimalen element e: ',col);
    end;
    procedure Otp(var E:Matrix; name: char);
    var
    i,j:integer;
    begin
    for i:=1 to m do
    begin
    for j:=1 to n do
    begin
    writeln(name,'[',i,',',j,']=',E[i,j]:6:2);
    end;
    end;
    end;

    begin
    repeat
    begin
    write('Vyvedete redovete na masivite (maksimalno',max,'): ');
    readln(m);
    end;
    until (m>1) and (m<=20);
    repeat
    begin
    write('Vyvedete stulbovete na masivite (maksimalno',max,'): ');
    readln(n);
    end;
    until (n>1) and (n<=20);
    writeln('Vyvedohte slednata matrica: [',m,',',n,']');
    end;
    Inp(A, 'A');
    Otp(A, 'A'); readln;
    Inp(B, 'B');
    Otp(B, 'B'); readln;
    Inp(C, 'C');
    Otp(C, 'C'); readln;
    end.

  4. #4
    Registered User
    Join Date: Nov:2005
    Location: Bulgaia, Sofiq
    Posts: 1
    ?

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 |