Accueil     Soft. MacOSX     Soft. MacOS/PC     PHP     Python     ROMS GBA     TP d'info     DBZ-GT     Martingales     Galeries     Liens     @  

Exercice 4

program ex4;
const
n = 10;
type
tab = array[1..n, 1..n] of real;
var
i, j, k: integer;
r: real;
mat_a, mat_b, mat_c: tab;

begin
writeln('©2001 All Rights Reserved to www.Software-DS.com');
writeln;
writeln('Correction du TD3 2*i+j:');
for i := 1 to n do
for j := 1 to n do
mat_a[i, j] := 2 * i + j;

for i := 1 to n do
begin
for j := 1 to n do
write(mat_a[i, j] : 2 : 0, ' ');
writeln;
end;

for i := 1 to n do
for j := 1 to n do
mat_b[i, j] := 3 * i + j;
writeln;
writeln('Correction du 3*i+j:');
for i := 1 to n do
begin
for j := 1 to n do
write(mat_b[i, j] : 2 : 0, ' ');
writeln;
end;

for i := 1 to n do
for j := 1 to n do
begin
r := 0;
for k := 1 to n do
r := r + mat_a[i, k] * mat_b[k, j];
mat_c[i, j] := r;
end;
writeln;
writeln('Matrice C=A*B=');
for i := 1 to n do
begin
for j := 1 to n do
write(mat_c[i, j] : 1 : 0, ' ');
writeln;
end;
writeln;
writeln('©2001 All Rights Reserved to www.Software-DS.com');
{ ©2001 All Rights Reserved to http://www.Software-DS.com 09/10/01 }
end.





Haut de la page - Page précédente - Page générée en 0.00895 sec.
Recherche personnalisée
 

1845021 visiteurs.   ©2001-2023 All Rights Reserved to Software-DS.com
Made with a mac  
Confidentialité