Videos

.

lunes, 25 de mayo de 2009

Tablas de multiplicar - Visual Basic 6

Agregamos un CommandButton y un TextBox y agregamos el siguiente codigo:

Private Sub Command1_Click()
For j = 1 To 10
resultado = Val(Text1.Text) * j
Print j & " x " & Val(Text1.Text) & " = " & resultado
Next j
End Sub

Y tecleamos cual tabla queremos que nos muestre (si deseamos limpiar el formulario tecleamos "Form1.cls")

1 comentarios:

For a = 1 To 10
resultado = Val(tablatxt.Text) * a
Print a & " x " & Val(tablatxt.Text) & " = " & resultado
Next a

yo lo ize asi y me sale
1*0=0
2*0=0
3*0=0
4*0=0
5*0=0
6*0=0
7*0=0
8*0=0
hasta 10 -.-
que chafa

Insertar

Twitter Delicious Facebook Digg Stumbleupon Favorites More