Home page |
![]() |
Teacher |
![]() |
Online |
Il sito |
Competenze da acquisire |
Regole didattiche |
Contatore visite (dal 18-10-07) N° |
|
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
program matrice;
const
N= 2; {numero delle righe}
M= 3; {numero delle colonne}
var
MAT:array[1..N,1..M]of integer;
VR: array[1..N] of integer;
VC:array[1..M] of integer;
Procedure caricamatrice;
var
I: integer;
J: integer;
Begin
for I:=1 to n do
for J:=1 to m do
begin
writeln ('inserisci l''elemento che si trova nella',I,'riga e ',J ,'colonna');
readln (MAT[I,j]);
end;
end;
Procedure totriga;
var
i:integer;
totr:integer;
j:integer;
begin
for I:=1 to n do
begin
totr:=0;
for j:=1 to m do
totr:= totr + MAT[i,j];
vr[i] := totr;
end;
end;
procedure totcolonne;
var i,j:integer;totc:integer;
begin
for j:=1 to M do
begin
totc:=0;
for i:=1 to N do
totc := totc + MAT[i,j];
vc[j] := totc;
end;
end;
procedure stampaVR;
var i:integer;
begin
writeln;
writeln ('ecco il vettore VR');
for i :=1 to n do writeln (vR[i])
end;
procedure stampaVC;
var j:integer;
begin
writeln;
writeln ('ecco il vettore VC');
for J:=1 to M do writeln (VC[j])
end;
begin {p.p.}
caricamatrice;
totriga;
totcolonne;
stampaVR;
stampaVC;
end.
Il TG diurno su e20 Sicilia, per il sito web dell'Ufficio Tributi, realizzato al Fermi
Il TG serale di e20 Sicilia, per il primo sito dell'Ufficio Tributi, realizzato al Fermi
Terra promessa
la mia partecipazione all'Eredità
Un professore da lanciare via a razzo!
Giornata da ..sballo