Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
13/05/12 12:10
ket4e_srce
program bataglianavale;
type
mat=array[1..10,1..10] of integer;
var
k,j:integer;
x,y:integer;
c:integer
utente:mat;
pc:mat;
procedure azzera;
var
x,y:integer;
k,j:integer;
begin
for x:=1 to 10 do;
for y:=1 to 10 do;
for k:=1 to 10 do;
for j:=1 to 10 do;
begin
utente[x,y]:=0;
pc[k,j]:=0;
end;
end;
procedure inserisciutente;
var
c:integer;
x,y:integer;
begin
for c:=1 to 5 do;
begin
writeln('inserire le coordinate della nave',c);
readln(x);
readln(y);
utente[x,y]:=1;
end;
end;
procedure inseriscipc;
var
c:integer;
k,j:integer;
begin
for c:=1 to 5 do;
begin
k:=random(10)+1;
j:=random(10)+1;
pc[k,j]:=1;
end;
end;
procedure giocautente;
var
k,j:integer;
x,y:integer;
c:integer;
begin
writeln('inserire le coordinate',k,j);
readln(k);
readln(j);
for c:=1 to 5 do;
if pc[k,j]=1 then writeln('la nave è stata colpita')
else writeln('la nave non è stata colpita');
readln;
end;
procedure giocapc;
var
k,j:integer;
x,y:integer;
c:integer;
begin
writeln('inserire le coordinate',x,y);
readln(x);
readln(y);
for c:=1 to 5 do;
if utente[x,y]=1 then writeln('la nave è stata colpita')
else writeln('la nave non è stata colpita');
readln;
end;
end.




MI DA QUESTO ERRORE

8 / 1 nnn.pas Fatal: Syntax error, ; expected but identifier UTENTE found
come faccio a risolverlo??
aaa
13/05/12 12:46
nessuno
Cosa manca in questa linea

c:integer


?
Ricorda che nessuno è obbligato a risponderti e che nessuno è perfetto ...
---
Il grande studioso italiano Bruno de Finetti ( uno dei padri fondatori del moderno Calcolo delle probabilità ) chiamava il gioco del Lotto Tassa sulla stupidità.
13/05/12 12:46
netarrow
Questo topic è in violazione di una o più norme del regolamento: pierotofy.it/pages/extras/forum/9/3839-regolamento/ .
    
Dopo averlo letto riapri un nuovo topic assicurandoti di aver rispettato le regole. Grazie per la tua pazienza.
aaa