esercitazioni su argomenti di chimica a livello didattico, liceale
con turbo pascal v.5-7

interazione su nomenclatura e formule chimiche

Program forma3;
(* nomenclatura composti chimici SALI *

Program forma4;
(* nomenclatura composti chimici SALI *)

Program forma6;
(* nomenclatura composti chimici IDROSSIDI *)


Program forma3;
(* nomenclatura composti chimici SALI *)
uses crt;
 const k=20;
var esatte,errate,totale,a,b,i,n,g:integer;
    ris,rip,s1,s2:string;
    dx:array[1..k] of string;
    rs:array[1..k] of string;
    mx:array[1..k] of string;
    nx:array[1..k] of string;
    
procedure dati;
begin
mx[1]:='Li';mx[2]:='Na';mx[3]:='K';mx[4]:='Rb';mx[5]:='Cs';mx[6]:='Cu';
mx[7]:='Ca';mx[8]:='Ba';mx[9]:='Zn';mx[10]:='Cd';mx[11]:='Hg';mx[12]:='Fe';
mx[13]:='Cu';mx[14]:='Sn';mx[15]:='Pb';mx[16]:='Mg';
mx[17]:='Fe';mx[18]:='Al';
mx[19]:='Pb';mx[20]:='Sn';

nx[1]:='LITIO1';nx[2]:='SODIO1';nx[3]:='POTASSIO1';nx[4]:='RUBIDIO1';
nx[5]:='CESIO1';nx[6]:='RAME1';nx[7]:='CALCIO2';nx[8]:='BARIO2';
nx[9]:='ZINCO2';nx[10]:='CADMIO2';nx[11]:='MERCURIO2';nx[12]:='FERRO2';
nx[13]:='RAME2';nx[14]:='STAGNO2';nx[15]:='PIOMBO2';nx[16]:='MAGNESIO2';
nx[17]:='FERRO3';nx[18]:='ALLUMINIO3';nx[19]:='PIOMBO4';nx[20]:='STAGNO4';

dx[1]:='Cl';rs[1]:='CLORURO DI ';
dx[2]:='F';rs[2]:='FLUORURO DI ';
dx[3]:='I';rs[3]:='IODURO DI ';
dx[4]:='Br';rs[4]:='BROMURO DI ';

dx[5]:='(NO3)';rs[5]:='NITRATO DI ';
dx[6]:='(ClO)';rs[6]:='IPOCLORITO DI ';
dx[7]:='(ClO3)';rs[7]:='CLORATO DI ';
dx[8]:='(ClO7)';rs[8]:='PERCLORATO DI ';
dx[9]:='(ClO2)';rs[9]:='CLORITO DI ';
dx[10]:='(NO2)';rs[10]:='NITRITO DI ';
dx[11]:='(BrO)';rs[11]:='IPOBROMITO DI ';
dx[12]:='(IO3)';rs[12]:='IODATO DI ';
dx[13]:='(Br02)';rs[13]:='BROMITO DI ';
dx[14]:='(IO4)';rs[14]:='PERIODATO DI ';
dx[15]:='(BrO4)';rs[15]:='PERBROMATO DI ';

dx[16]:='(SO4)';rs[16]:='SOLFATO DI ';
dx[17]:='(SO3)';rs[17]:='SOLFITO DI ';
dx[18]:='(CO3)';rs[18]:='CARBONATO DI ';
dx[19]:='(S)';rs[19]:='SOLFURO DI ';

dx[20]:='(PO4)';rs[20]:='FOSFATO DI ';
end;
          
procedure pausa; 
begin
writeln('premi enter');readln;
end;
 
procedure cancella;
begin
clrscr;
end;

procedure fine;  
begin
writeln('fine operazione:confermare :premi enter');
readln;
end;

procedure verifica2(s1,s2:string);
begin
rip:=concat(rs[a],nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica2a(s1,s2:string;g:integer);
begin
rip:=concat(rs[g],nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica3(s1,s2:string;g:integer);
begin
rip:=concat(rs[a],nx[g]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;


procedure sali1(i,n:integer); (* metalli monovalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[a],'  ');readln(ris);s2:=nx[a];
verifica2(ris,s2);
end;
end;

procedure sali2(i,n:integer); (* metalli bivalenti acidi monovalenti *)
begin
writeln('scrivi :es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[a],2,'  ');readln(ris);s2:=nx[a];
verifica2(ris,s2);
end;
end;

procedure sali3(i,n,g:integer); (* metalli monovalenti acidi bivalenti *)
begin
writeln('scrivi :es.CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],2,dx[g],'  ');readln(ris);s2:=nx[a];
verifica2a(ris,s2,g);
end;end;


procedure sali4(i,n,g:integer); (* metalli bivalenti acidi bivalenti *)
begin
writeln('scrivi:es.  CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[g],'  ');readln(ris);s2:=nx[a];
verifica2a(ris,s2,g);
end;
end;

procedure sali5(i,n,g:integer); (* metalli trivalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali6(i,n,g:integer); (* metalli trivalenti acidi bivalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],2,dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali7(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],4,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali8(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi :es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],2,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure pro1;
begin
writeln('scopo del programma e verificare la conoscenza della nomenclatura');
writeln('dei composti chimici:SALI BINARI E TERNARI ');
pausa;
end;

procedure pro2;
begin
(* da quale elemento iniziare e quanti elementi contare *)
sali1(0,6);pausa;cancella;
sali2(7,8);pausa;cancella;
end;


procedure pro3;
begin
sali3(0,6,16);pausa;cancella;sali3(0,6,17);pausa;cancella;
sali3(0,6,18);pausa;cancella;sali3(0,6,19);pausa;cancella;
end;

procedure pro4;
begin
sali4(7,9,16);pausa;cancella;sali4(7,9,17);pausa;cancella;
sali4(7,9,18);pausa;cancella;sali4(7,9,19);pausa;cancella;
end;

procedure pro5;
begin
sali5(0,15,17);pausa;cancella;sali5(0,15,18);pausa;cancella; 
sali6(15,4,17);pausa; cancella;sali6(15,4,18);pausa;cancella;
end;

procedure pro6;
begin
sali7(0,15,19);pausa;cancella;sali7(0,15,20);pausa;cancella;
sali8(15,4,19);pausa;cancella;sali8(15,4,20);pausa;cancella;
end;

procedure scelta;  
var s,sn:string;opzione:integer;
begin
cancella;;
writeln('seleziona opzione per NOMENCLATURA CHIMICA ');
writeln('selezionare le diverse opzioni per scrivere i nomi dei sali');
writeln('-----------------------------------------------------------');
writeln('nello scrivere i nomi dei sali fare molta attenzione ');
writeln('scrivere tutto maiuscolo,evitando spaziature inutili ');
writeln('e scrivere anche la valenza del metallo ');
writeln('CLORURO DI SODIO1');
writeln('SOLFATO DI FERRO3');
writeln('es.di nome scritto con i soli due spazi indicati');writeln;
writeln('1...istruzioni e spiegazione programma ');
writeln('2.... ...........scrivi il nome del sale');
writeln('3..... ..........scrivi il nome del sale');
writeln('4..... ..........scrivi il nome del sale');
writeln('5.... ...........scrivi il nome del sale');
writeln('6..... ..........scrivi il nome del sale');
writeln('9...fine ');
writeln('scelta =');readln(opzione);cancella;
case opzione of
1:pro1;2:pro2;3:pro3;4:pro4;5:pro5;6:pro6;
9:fine;
end;
writeln('altra operazione?Esperimenti?:premi S...fine:premi N '); readln(sn);
if ((sn='S') or (sn='s')) then scelta ;
end;

begin            (* programma di lancio *)
cancella;
esatte:=0;errate:=0;totale:=0;
scelta;cancella;
writeln('risposte esatte  ',esatte,' su domande ',totale);
writeln('risposte errate  ',errate,' su domande ',totale);
writeln('chiama insegnante per valutazione ');
pausa;
end.

 


 

Program forma4;
(* nomenclatura composti chimici SALI *)
uses crt;
 const k=20;
var esatte,errate,totale,a,b,i,n,g:integer;
    ris,rip,s1,s2:string;
    dx:array[1..k] of string;
    rs:array[1..k] of string;
    mx:array[1..k] of string;
    nx:array[1..k] of string;
    
procedure dati;
begin
mx[1]:='Li';mx[2]:='Na';mx[3]:='K';mx[4]:='Rb';mx[5]:='Cs';mx[6]:='Cu';
mx[7]:='Ca';mx[8]:='Ba';mx[9]:='Zn';mx[10]:='Cd';mx[11]:='Hg';mx[12]:='Fe';
mx[13]:='Cu';mx[14]:='Sn';mx[15]:='Pb';mx[16]:='Mg';
mx[17]:='Fe';mx[18]:='Al';
mx[19]:='Pb';mx[20]:='Sn';

nx[1]:='LITIO1';nx[2]:='SODIO1';nx[3]:='POTASSIO1';nx[4]:='RUBIDIO1';
nx[5]:='CESIO1';nx[6]:='RAME1';nx[7]:='CALCIO2';nx[8]:='BARIO2';
nx[9]:='ZINCO2';nx[10]:='CADMIO2';nx[11]:='MERCURIO2';nx[12]:='FERRO2';
nx[13]:='RAME2';nx[14]:='STAGNO2';nx[15]:='PIOMBO2';nx[16]:='MAGNESIO2';
nx[17]:='FERRO3';nx[18]:='ALLUMINIO3';nx[19]:='PIOMBO4';nx[20]:='STAGNO4';

dx[1]:='Cl';rs[1]:='CLORURO DI ';
dx[2]:='F';rs[2]:='FLUORURO DI ';
dx[3]:='I';rs[3]:='IODURO DI ';
dx[4]:='Br';rs[4]:='BROMURO DI ';

dx[5]:='(NO3)';rs[5]:='NITRATO DI ';
dx[6]:='(ClO)';rs[6]:='IPOCLORITO DI ';
dx[7]:='(ClO3)';rs[7]:='CLORATO DI ';
dx[8]:='(ClO7)';rs[8]:='PERCLORATO DI ';
dx[9]:='(ClO2)';rs[9]:='CLORITO DI ';
dx[10]:='(NO2)';rs[10]:='NITRITO DI ';
dx[11]:='(BrO)';rs[11]:='IPOBROMITO DI ';
dx[12]:='(IO3)';rs[12]:='IODATO DI ';
dx[13]:='(Br02)';rs[13]:='BROMITO DI ';
dx[14]:='(IO4)';rs[14]:='PERIODATO DI ';
dx[15]:='(BrO4)';rs[15]:='PERBROMATO DI ';

dx[16]:='(SO4)';rs[16]:='SOLFATO DI ';
dx[17]:='(SO3)';rs[17]:='SOLFITO DI ';
dx[18]:='(CO3)';rs[18]:='CARBONATO DI ';
dx[19]:='(S)';rs[19]:='SOLFURO DI ';

dx[20]:='(PO4)';rs[20]:='FOSFATO DI ';
end;
          
procedure pausa; 
begin
writeln('premi enter');readln;
end;
 
procedure cancella;
begin
clrscr;
end;

procedure fine;  
begin
writeln('fine operazione:confermare :premi enter');
readln;
end;

procedure verifica2(s1,s2:string);
begin
rip:=concat(rs[a],nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica2a(s1,s2:string;g:integer);
begin
rip:=concat(rs[g],nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica3(s1,s2:string;g:integer);
begin
rip:=concat(rs[a],nx[g]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;


procedure sali1(i,n:integer); (* metalli monovalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[a],'  ');readln(ris);s2:=nx[a];
verifica2(ris,s2);
end;
end;

procedure sali2(i,n:integer); (* metalli bivalenti acidi monovalenti *)
begin
writeln('scrivi :es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[a],2,'  ');readln(ris);s2:=nx[a];
verifica2(ris,s2);
end;
end;

procedure sali3(i,n,g:integer); (* metalli monovalenti acidi bivalenti *)
begin
writeln('scrivi :es.CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],2,dx[g],'  ');readln(ris);s2:=nx[a];
verifica2a(ris,s2,g);
end;end;


procedure sali4(i,n,g:integer); (* metalli bivalenti acidi bivalenti *)
begin
writeln('scrivi:es.  CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],dx[g],'  ');readln(ris);s2:=nx[a];
verifica2a(ris,s2,g);
end;
end;

procedure sali5(i,n,g:integer); (* metalli trivalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali6(i,n,g:integer); (* metalli trivalenti acidi bivalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],2,dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali7(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],4,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali8(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi :es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],2,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure pro1;
begin
writeln('scopo del programma e verificare la conoscenza della nomenclatura');
writeln('dei composti chimici:SALI BINARI E TERNARI ');
pausa;
end;

procedure pro2;
begin
(* da quale elemento iniziare e quanti elementi contare *)
sali1(0,6);pausa;cancella;
sali2(7,8);pausa;cancella;
end;


procedure pro3;
begin
sali3(0,6,16);pausa;cancella;sali3(0,6,17);pausa;cancella;
sali3(0,6,18);pausa;cancella;sali3(0,6,19);pausa;cancella;
end;

procedure pro4;
begin
sali4(7,9,16);pausa;cancella;sali4(7,9,17);pausa;cancella;
sali4(7,9,18);pausa;cancella;sali4(7,9,19);pausa;cancella;
end;

procedure pro5;
begin
sali5(0,15,17);pausa;cancella;sali5(0,15,18);pausa;cancella; 
sali6(15,4,17);pausa; cancella;sali6(15,4,18);pausa;cancella;
end;

procedure pro6;
begin
sali7(0,15,19);pausa;cancella;sali7(0,15,20);pausa;cancella;
sali8(15,4,19);pausa;cancella;sali8(15,4,20);pausa;cancella;
end;

procedure pro7;
begin
sali8(15,4,19);pausa;cancella;sali8(15,4,20);pausa;cancella;
sali5(0,15,17);pausa;cancella;sali5(0,15,18);pausa;cancella; 
sali7(0,15,19);pausa;cancella;sali7(0,15,20);pausa;cancella;
sali6(15,4,17);pausa; cancella;sali6(15,4,18);pausa;cancella;
sali4(7,9,18);pausa;cancella;sali4(7,9,19);pausa;cancella;
sali1(0,6);pausa;cancella;sali2(7,8);pausa;cancella;
sali3(0,6,18);pausa;cancella;sali3(0,6,19);pausa;cancella;
sali4(7,9,16);pausa;cancella;sali4(7,9,17);pausa;cancella;
end;

procedure scelta;  
var s,sn:string;opzione:integer;
begin
cancella;;
writeln('seleziona opzione per NOMENCLATURA CHIMICA ');
writeln('selezionare le diverse opzioni per scrivere i nomi dei sali');
writeln('-----------------------------------------------------------');
writeln('nello scrivere i nomi dei sali fare molta attenzione ');
writeln('scrivere tutto maiuscolo,evitando spaziature inutili ');
writeln('e scrivere anche la valenza del metallo ');
writeln('CLORURO DI SODIO1');
writeln('SOLFATO DI FERRO3');
writeln('es.di nome scritto con i soli due spazi indicati');writeln;
writeln('1...istruzioni e spiegazione programma ');
writeln('2.... ...........scrivi il nome del sale');
writeln('3..... ..........scrivi il nome del sale');
writeln('4..... ..........scrivi il nome del sale');
writeln('5.... ...........scrivi il nome del sale');
writeln('6..... ..........scrivi il nome del sale');
writeln('7................riassuntivo precedenti:eseguilo per ultimo.. ');
writeln('9...fine ');
writeln('scelta =');readln(opzione);cancella;
case opzione of
1:pro1;2:pro2;3:pro3;4:pro4;5:pro5;6:pro6;7:pro7;
9:fine;
end;
writeln('altra operazione?Esperimenti?:premi S...fine:premi N '); readln(sn);
if ((sn='S') or (sn='s')) then scelta ;
end;

begin            (* programma di lancio *)
cancella;
esatte:=0;errate:=0;totale:=0;
scelta;cancella;
writeln('risposte esatte  ',esatte,' su domande ',totale);
writeln('risposte errate  ',errate,' su domande ',totale);
writeln('chiama insegnante per valutazione ');
pausa;
end.

 


 

Program forma6;
(* nomenclatura composti chimici IDROSSIDI *)
uses crt;
 const k=20;
var esatte,errate,totale,a,b,i,n,g:integer;
    ris,rip,s1,s2,k1,h1,k2,k3,k4:string;
    dx:array[1..k] of string;
    rs:array[1..k] of string;
    mx:array[1..k] of string;
    nx:array[1..k] of string;
    
procedure dati;
begin
mx[1]:='Li';mx[2]:='Na';mx[3]:='K';mx[4]:='Rb';mx[5]:='Cs';mx[6]:='Cu';
mx[7]:='Ca';mx[8]:='Ba';mx[9]:='Zn';mx[10]:='Cd';mx[11]:='Hg';mx[12]:='Fe';
mx[13]:='Cu';mx[14]:='Sn';mx[15]:='Pb';mx[16]:='Mg';
mx[17]:='Fe';mx[18]:='Al';
mx[19]:='Pb';mx[20]:='Sn';

nx[1]:='LITIO1';nx[2]:='SODIO1';nx[3]:='POTASSIO1';nx[4]:='RUBIDIO1';
nx[5]:='CESIO1';nx[6]:='RAME1';nx[7]:='CALCIO2';nx[8]:='BARIO2';
nx[9]:='ZINCO2';nx[10]:='CADMIO2';nx[11]:='MERCURIO2';nx[12]:='FERRO2';
nx[13]:='RAME2';nx[14]:='STAGNO2';nx[15]:='PIOMBO2';nx[16]:='MAGNESIO2';
nx[17]:='FERRO3';nx[18]:='ALLUMINIO3';nx[19]:='PIOMBO4';nx[20]:='STAGNO4';

dx[1]:='OH';rs[1]:='IDROSSIDO DI ';
dx[2]:='OH';rs[2]:='IDROSSIDO DI ';
dx[3]:='OH';rs[3]:='IDROSSIDO DI ';
dx[4]:='OH';rs[4]:='IDROSSIDO DI ';

dx[5]:='(OH)';rs[5]:='IDROSSIDO DI ';
dx[6]:='(OH)';rs[6]:='IDROSSIDO DI ';
dx[7]:='(OH)';rs[7]:='IDROSSIDO DI ';
dx[8]:='(OH)';rs[8]:='IDROSSIDO DI ';
dx[9]:='(OH)';rs[9]:='IDROSSIDO DI ';
dx[10]:='(OH)';rs[10]:='IDROSSIDO DI ';
dx[11]:='(OH)';rs[11]:='IDROSSIDO DI ';
dx[12]:='(OH)';rs[12]:='IDROSSIDO DI ';
dx[13]:='(OH)';rs[13]:='IDROSSIDO DI ';
dx[14]:='(OH)';rs[14]:='IDROSSIDO DI ';
dx[15]:='(OH)';rs[15]:='IDROSSIDO DI ';

dx[16]:='(OH)';rs[16]:='IDROSSIDO DI ';
dx[17]:='(OH)';rs[17]:='IDROSSIDO DI ';
dx[18]:='(OH)';rs[18]:='IDROSSIDO DI ';
dx[19]:='(OH)';rs[19]:='IDROSSIDO DI ';

dx[20]:='(OH)';rs[20]:='IDROSSIDO DI ';
end;
          
procedure pausa; 
begin
writeln('premi enter');readln;
end;
 
procedure cancella;
begin
clrscr;
end;

procedure fine;  
begin
writeln('fine operazione:confermare :premi enter');
readln;
end;

procedure verifica2(ris,s1:string);
begin
rip:=concat(h1,nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica2a(s1,s2:string;g:integer);
begin
rip:=concat(rs[g],nx[a]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;

procedure verifica3(s1,s2:string;g:integer);
begin
rip:=concat(rs[a],nx[g]);
if ris=rip then begin writeln('  esatto ');esatte:=esatte+1;end
else begin writeln('  errato:era ',rip);errate:=errate+1;end;
end;


procedure sali1(i,n:integer); (* metalli monovalenti  *)
begin
writeln('scrivi:es. IDROSSIDO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],k1,'  ');readln(ris);s1:=mx[a];
verifica2(ris,s1);
end;
end;

procedure sali2(i,n:integer); (* metalli bivalenti  *)
begin
writeln('scrivi :es. IDROSSIDO DI CALCIO2 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=0 to n do
begin
a:=i+b;
write(mx[a],k2,'  ');readln(ris);s1:=mx[a];
verifica2(ris,s1);
end;
end;

procedure sali3(i,n:integer); (* metalli trivalenti  *)
begin
writeln('scrivi :es.IDROSSIDO DI FERRO3 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],k3,'  ');readln(ris);s1:=mx[a];
verifica2(ris,s1);
end;end;


procedure sali4(i,n:integer); (* metalli tetravalenti *)
begin
writeln('scrivi:es.  IDROSSIDO DI GERMANIO4 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[a],k4,'  ');readln(ris);s1:=mx[a];
verifica2(ris,s1);
end;
end;

procedure sali5(i,n,g:integer); (* metalli trivalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali6(i,n,g:integer); (* metalli trivalenti acidi bivalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1 oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],2,dx[a],3,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali7(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi:es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],4,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure sali8(i,n,g:integer); (* metalli tetravalenti acidi monovalenti *)
begin
writeln('scrivi :es. CLORURO DI SODIO1  oppure premi ENTER');
writeln;
dati;a:=0;
for b:=1 to n do
begin
a:=i+b;
write(mx[g],dx[a],2,'  ');readln(ris);s2:=nx[g];
verifica3(ris,s2,g);
end;
end;

procedure pro1;
begin
writeln('scopo del programma e verificare la conoscenza della nomenclatura');
writeln('dei composti chimici:IDROSSIDI ');
pausa;
end;

procedure pro2;
begin
(* da quale elemento iniziare e quanti elementi contare *)
sali1(0,6);pausa;cancella;sali2(7,8);pausa;cancella;
sali3(16,2);pausa;cancella;sali4(18,2);pausa;cancella;
end;


procedure pro3;
begin
sali4(18,2);pausa;cancella;
sali1(0,6);pausa;cancella;sali2(7,8);pausa;cancella;
sali3(16,2);pausa;cancella;sali4(18,2);pausa;cancella;
sali2(7,8);pausa;cancella;
end;

procedure pro4;
begin

end;

procedure pro5;
begin

end;

procedure pro6;
begin

end;

procedure scelta;  
var s,sn:string;opzione:integer;
begin
cancella;;
writeln('seleziona opzione per NOMENCLATURA CHIMICA ');
writeln('selezionare le diverse opzioni per scrivere i nomi di idrossidi');
writeln('-----------------------------------------------------------');
writeln('nello scrivere i nomi  fare molta attenzione ');
writeln('scrivere tutto maiuscolo,evitando spaziature inutili ');
writeln('e scrivere anche la valenza del metallo ');
writeln('IDROSSIDO DI SODIO1');
writeln('IDROSSIDO DI FERRO3');
writeln('es.di nome scritto con i soli due spazi indicati');writeln;
writeln('1...istruzioni e spiegazione programma ');
writeln('2.... ...........scrivi il nome dello idrossido');
writeln('3................riassuntivo precedenti');
writeln('9...fine ');
writeln('scelta =');readln(opzione);cancella;
case opzione of
1:pro1;2:pro2;3:pro3;
9:fine;
end;
writeln('altra operazione?Esperimenti?:premi S...fine:premi N '); readln(sn);
if ((sn='S') or (sn='s')) then scelta ;
end;

begin            (* programma di lancio *)
cancella;
k1:='OH';h1:='IDROSSIDO DI ';k2:='(OH)2';k3:='(OH)3';k4:='(OH)4';
esatte:=0;errate:=0;totale:=0;
scelta;cancella;
writeln('risposte esatte  ',esatte,' su domande ',totale);
writeln('risposte errate  ',errate,' su domande ',totale);
writeln('chiama insegnante per valutazione ');
pausa;
end.

 

 

 

 

 

 

ritorna