Home page

Teacher

On

line

Il sito

Competenze da acquisire

Regole didattiche

Contatore visite
 (dal 18-10-07)
Hit Counter
  Esercitazion PON / TIC Album Fotografico ricreazione_e_video Forum didattico Progetti Alunni Corsi per docenti Download    

IIS: Ragioneria

1°Anno  CAT

2°Anno AFM

3° Anno AFM

3° Anno  SIA

4°Anno AFM

4°Anno SIA

5°Anno SIA


Algoritmi fondamentali


Flow Chart


Codice


Ricordi

Statistiche

Matrici:

    Pag. 449 n.5

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.

IPC:Professionale per il commercio

Terzo Anno

Quarto Anno

Quinto Anno