Erreur 85 ';' expected

ayari najd -  
KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour,

j'ai un problem avec mon tp en pascal voila:
program stromph;
uses wincrt;
type
najd = array [2..100] of integer;
var
i,j,n,c :integer;
t : najd;
begin
repeat
writeln ('donner le nombre des colones');
readln (n)
until (n<11) and (2<n);
for i :=1 to 2 do
for j := 1 to n do
readln t[i,j] ;
for j :=1 ti n do
t[3,j] := 0
for i := 1 to n do
t[3,j]:= t[3,j]+ t[i,j] * t[2,i];
c:=0 ;
for j := 1 to n do
c := c+t[3,j];
end.


1 réponse

KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   3 020
 
Le message est pourtant clair, il te manque des ';'

readln (n) ;

t[3,j] := 0 ;

Remarque : ton type najd ne te permet pas d'avoir deux indices dans ton tableau.
Il faudrait plutôt écrire :

type najd = array [2..100,2..100] of integer;
Autres erreurs à corriger :

readln(t[i,j]); // et non "readln t[i,j] ;"
for j :=1 to n do // "to" et pas "ti"
0