Código Delphi
[-]
var
n,m,i,j,nota,apro,repro: Integer;
begin
n:= StrToInt(txt1.Text);
m:= StrToInt(txt2.Text);
gr1.RowCount:= n;
gr1.ColCount:= m;
i:= 0;
j:= 0;
apro:= 0;
repro:= 0;
while (i < n) Do
Begin
notas[i,j]:= InputBox('Notas','Ingrese El Nombre','');
gr1.cells[j,i]:= notas[i,j];
i:= i+1;
End;
i:=0;
j:=1;
while (i < n) Do
Begin
nota:= StrToInt(InputBox('Notas','Ingrese La Nota',''));
If ((nota>=0) And (nota<=10)) Then
Begin
matriz[i,j]:= nota;
gr1.cells[j,i]:= IntToStr(matriz[i,j]);
End
Else
Begin
Showmessage('La nota es erronea');
nota:= StrToInt(InputBox('Notas','Ingrese La Nota',''));
notas[i,j]:= IntToStr(nota);
gr1.cells[j,i]:= notas[i,j];
End;
i:= i+1;
If (nota >= 5) Then
Begin
apro:= apro+1;
End
Else
Begin
repro:= repro+1;
End;
End;
txta.Text:= IntToStr(apro);
txtr.Text:= IntToStr(repro);
mi problema es que solo estoy llenando una columna y deja de pedirme las notas y lo que quiero es llenar la cantidad de columnas según yo decida cuantas columnas introducir (si c me entiende?)
perdón por lo de tus ojos espero que te mejores