deberia de quedar algo asi
| 3| 5| 7||15|
| 4| 9| 2||15|
si se fijan todas las sumas concuerdan perfectamente... ahora este es mi problema a la hora de realizar la instruccion tengo un problema vean:
este es mi codigo fuente:
| |1| |
|3| | |
| | |2|
este es mi codigo fuente:
Código:
hay esta el codigo pero solo me muestra lo siguientePrivate Sub Command1_Click() N = 3 I = 0 J = (N - 1) / 2 A.Row = I A.Col = J A = J For CONT = 2 To N ^ 2 I = I - 1 If I < 0 Then I = N - 1 End If J = J + 1 If J > (N - 1) Then J = 0 End If Ib = I Jb = J A.Row = I A.Col = J A = CONT Next CONT End Sub
|3| | |
| | |2|
ahora mi problema es q necisto la instrucion q me diga cuando el valor de la I y la J (osea filas y columnas) este ocupado osea sea mayor a 0 colocque lo sig:
Tengo entendio q es con un IF.. sera algo asi
If INSTRUCCION Q NECESITO > 0 Then
I=Ib
J=Jb
I=I+1
Else
INSTRUCCION Q NECESITO = CONT
End If
Luego de eso deberia de quedar asi y realizar todo el proceso...
Tengo entendio q es con un IF.. sera algo asi
If INSTRUCCION Q NECESITO > 0 Then
I=Ib
J=Jb
I=I+1
Else
INSTRUCCION Q NECESITO = CONT
End If
Luego de eso deberia de quedar asi y realizar todo el proceso...
| |1| |
|3| | |
|4| |2|
gracias por su ayuda
[/center]