Ciclo

Solo disponible en BuenasTareas
  • Páginas : 4 (996 palabras )
  • Descarga(s) : 0
  • Publicado : 6 de marzo de 2011
Leer documento completo
Vista previa del texto
Ciclo for
Aqui no me sale que me imprima toda la tabla


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim num, mul, i,j As Integer
num = InputBox("dame un numero")

For i = 0 To 4
j += 1

mul = num * j

Next
MsgBox(num & " * " & j & " = "& mul)

Y posss las demas aver checalas

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cal, sum,prom, i As Integer
For i = 1 To 7
cal = InputBox("dame la cal: ")
sum = sum + cal

Next
prom = sum / 7
'TextBox1.Text = promMsgBox("El prom es: " & prom)
End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim resp As Integer
resp= MsgBox("¿desea salir de la instalacion?", 36, " salir del sistema")
If resp = 6 Then
End
End If

End Sub

Private Sub Button4_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim edad, sum, i, peso, sum1, sum2, sum3, prom, prom1, prom2, prom3 As Integer

For i = 1 To 10
edad =InputBox("dame la edad: ")
peso = InputBox("dame la peso: ")
If edad <= 12 Then

sum = sum + peso
ElseIf edad >= 13 And edad <= 29 Thensum1 = sum1 + peso
ElseIf edad >= 30 And edad <= 59 Then

sum2 = sum2 + peso
ElseIf edad >= 60 Then

sum3 = sum3 +peso

End If

prom = sum / 10
prom1 = sum1 / 10
prom2 = sum2 / 10
prom3 = sum3 / 10

Next

MsgBox("la...
tracking img