home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1124.dms / 1124.adf / sources_pcq / matrice.p next >
Text File  |  1991-04-15  |  424b  |  41 lines

  1. program matrice;
  2. CONST
  3.     ligne =3;
  4.     colo =3;
  5. type
  6.  
  7.     TABL = ARRAY [1..LIGNE,1..COLO] OF integer;
  8.  
  9.  
  10. const 
  11.     a : tabl =
  12. (
  13. (1,1,1),
  14. (2,1,0),
  15. (3,0,1)); 
  16.     B : tabl =
  17. (
  18. (2,1,0),
  19. (1,2,3),
  20. (1,2,1)); 
  21.  
  22.  
  23.  
  24. var
  25.     i,j         : integer;
  26.     C         : tabl;
  27.  
  28. begin
  29.     for i := 1 to ligne do
  30.     begin
  31.       for j :=1 to colo do
  32.       begin
  33.       c[i,j]:= (a[i,1]*b[1,j])+
  34.            (a[i,2]*b[2,j])+
  35.            (a[i,3]*b[3,j]);
  36.       write(c[i,j],'/t');
  37.       end;
  38.     writeln;
  39.     end;
  40. end.
  41.