elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  ciclo for matrices
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: ciclo for matrices  (Leído 6,259 veces)
asdexiva

Desconectado Desconectado

Mensajes: 217



Ver Perfil
ciclo for matrices
« en: 21 Febrero 2014, 00:10 am »

alguien que me explique como uso el ciclo for en este ejemplo
es que en netbeans el for es facil pero necesito saber como es la sinstaxis aqui en vb6

Código:
a1 = Val(Text1)
a2 = Val(Text2)
a3 = Val(Text3)
b1 = Val(Text4)
b2 = Val(Text5)
b3 = Val(Text6)
c1 = Val(Text7)
c2 = Val(Text8)
c3 = Val(Text9)
a4 = 1
a5 = 0
a6 = 0
b4 = 0
b5 = 1
b6 = 0
c4 = 0
c5 = 0
c6 = 1
If a1 = 0 Then
MsgBox "ERROR NO TIENE INVERSA"
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text1.SetFocus
Else
X1 = a1 / a1
X2 = a2 / a1
X3 = a3 / a1
X4 = 1 / a1
X5 = 0
X6 = 0
Y1 = b1 - b1 * X1
Y2 = b2 - b1 * X2
Y3 = b3 - b1 * X3
Y4 = 0 - b1 * X4
Y5 = 1 - b1 * X5
Y6 = 0 - b1 * X6
Z1 = c1 - c1 * X1
Z2 = c2 - c1 * X2
Z3 = c3 - c1 * X3
Z4 = 0 - c1 * X4
Z5 = 0 - c1 * X5
Z6 = 1 - c1 * X6
If X1 = 0 Or Y2 = 0 Or Z3 = 0 Then
MsgBox "ERROR NO TIENE INVERSA"
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text1.SetFocus
Else
E1 = Y1 / Y2
E2 = Y2 / Y2
E3 = Y3 / Y2
E4 = Y4 / Y2
E5 = Y5 / Y2
E6 = Y6 / Y2
D1 = X1 - X2 * E1
D2 = X2 - X2 * E2
D3 = X3 - X2 * E3
D4 = X4 - X2 * E4
D5 = X5 - X2 * E5
D6 = X6 - X2 * E6
F1 = Z1 - Z2 * E1
F2 = Z2 - Z2 * E2
F3 = Z3 - Z2 * E3
F4 = Z4 - Z2 * E4
F5 = Z5 - Z2 * E5
F6 = Z6 - Z2 * E6
If D1 = 0 Or E2 = 0 Or F3 = 0 Then
MsgBox "ERROR NO TIENE INVERSA"
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text1.SetFocus
Else
I1 = F1 / F3
I2 = F2 / F3
I3 = F3 / F3
I4 = F4 / F3
I5 = F5 / F3
I6 = F6 / F3
G1 = D1 - D3 * I1
G2 = D2 - D3 * I2
G3 = D3 - D3 * I3
G4 = D4 - D3 * I4
G5 = D5 - D3 * I5
G6 = D6 - D3 * I6
H1 = E1 - E3 * I1
H2 = E2 - E3 * I2
H3 = E3 - E3 * I3
H4 = E4 - E3 * I4
H5 = E5 - E3 * I5
H6 = E6 - E3 * I6
Text10 = CStr(G4)
Text11 = CStr(G5)
Text12 = CStr(G6)
Text13 = CStr(H4)
Text14 = CStr(H5)
Text15 = CStr(H6)
Text16 = CStr(I4)
Text17 = CStr(I5)
Text18 = CStr(I6)
End If
End If
End If


End Sub

Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
Text12 = ""
Text13 = ""
Text14 = ""
Text15 = ""
Text16 = ""
Text17 = ""
Text18 = ""
Text1.SetFocus
End Sub


En línea

Shell Root
Moderador Global
***
Desconectado Desconectado

Mensajes: 3.723


<3


Ver Perfil WWW
Re: ciclo for matrices
« Respuesta #1 en: 21 Febrero 2014, 13:26 pm »

:http://msdn.microsoft.com/es-ES/library/5z06z1kb.aspx


En línea

Por eso no duermo, por si tras mi ventana hay un cuervo. Cuelgo de hilos sueltos sabiendo que hay veneno en el aire.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ayuda con un ciclo
Java
xAgramonx 3 3,228 Último mensaje 25 Noviembre 2010, 19:30 pm
por xAgramonx
Proyecto de fin de ciclo
Foro Libre
Khronos14 5 4,070 Último mensaje 31 Marzo 2011, 23:49 pm
por Jake Logan
Ciclo exacto
Programación C/C++
neeeko 1 2,590 Último mensaje 22 Febrero 2013, 04:59 am
por 85
ciclo for()
Programación C/C++
noah222 2 6,239 Último mensaje 18 Abril 2013, 15:23 pm
por rir3760
multipllicacion matrices ciclo for
Programación C/C++
asdexiva 1 5,414 Último mensaje 4 Diciembre 2014, 19:12 pm
por fary
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines