TABLE DE PYTHAGORE

Utilisateur anonyme - 31 août 2011 à 12:11
 Utilisateur anonyme - 31 août 2011 à 12:11
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/53527-table-de-pythagore

Utilisateur anonyme
31 août 2011 à 12:11
Ca fais longtemps que je n'ai pas fais de pascal/delphi, donc je n'ai rien pour compiler/tester, mais au lieu de faire 9*9 boucle, n'est il pas possible de faire quelque chose dans le genre:

For colonne:= 1 to 9 do
Begin
StringGrid1.Cells[colonne, 0]:= IntToStr(colonne);
StringGrid1.Cells[colonne, 1]:= IntToStr(1*(Colonne));
StringGrid1.Cells[colonne, 2]:= IntToStr(2*(Colonne));
StringGrid1.Cells[colonne, 3]:= IntToStr(3*(Colonne));
StringGrid1.Cells[colonne, 4]:= IntToStr(4*(Colonne));
StringGrid1.Cells[colonne, 5]:= IntToStr(5*(Colonne));
StringGrid1.Cells[colonne, 6]:= IntToStr(6*(Colonne));
StringGrid1.Cells[colonne, 7]:= IntToStr(7*(Colonne));
StringGrid1.Cells[colonne, 8]:= IntToStr(8*(Colonne));
StringGrid1.Cells[colonne, 9]:= IntToStr(9*(Colonne));
End

Integer i,j;
For i:=1 to 9 do
For j:=1 to 9 do
println("LOL ?");
Rejoignez-nous