Erreur 85 ';' expected

Fermé
ayari najd - 2 déc. 2012 à 10:20
KX Messages postés 16734 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 24 avril 2024 - 2 déc. 2012 à 13:11
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 16734 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 24 avril 2024 3 015
2 déc. 2012 à 13:11
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