Programacion facil de altas y bajas
Universidad Autónoma del estado de México plantel valle de México
Programa de ordenamiento y eliminación
grupo: A-21
Carrera: LAC
Introduccion:En esta ocación crearemos un programa que elimine y ordene varios datos; atraves de lo aprendido en el curso hasta el momento.
Instrucciones:
1) Abrir visual basic
2) Seleccione elproyecto “EXE estándar”
3) Diseñar la siguiente interface:
1 text box, con el titulo del programa
3 label
4 command button; con los siguientes nombres y en el orden, ingrsar datos, ordenar,ingresar datos nuevos y salir.
Quedando de un modo similar la ventana del programa:
4) Introducimos las instrucciones en el formulario para que ejecute y es el siguiente:
Dim VEC(10),X, Y, Z, i, j, AUX As Integer
Private Sub Command1_Click()
X = CInt(InputBox("¿CUANTOS DATOS DESEAS INGRESAR?" & X))
If (X <= 10) Then
For i = 1 To X
VEC(i) =CInt(InputBox("INTRODUCE VALOR" & i))
Next i
For i = 1 To X
Label2.Caption = Label2.Caption & VEC(i) & vbCrLf
Next i
Else
MsgBox ("MEMORIA INSUFICIENTE")
End If
End SubPrivate Sub Command2_Click()
Y = MsgBox("¿DESEA INGRESAR MAS DATOS?", vbYesNo & Y)
If (Y = vbYes) Then
Z = CInt(InputBox("¿CUANTOS VALORES DESEA INGRESAR?" & Z))
If ((Z + X)<= 10) Then
For i = X + 1 To (Z + X)
VEC(i) = CInt(InputBox("INTRODUCE EL VALOR" & i))
Next i
For i = 1 To (Z + X)Label3.Caption = Label3.Caption & VEC(i) & vbCrLf
Next i
Else
MsgBox ("MEMORIA INSUFICIENTE")
End If
End If
If (Y = vbNo) Then
MsgBox ("NO INGRESONINGUN VALOR")
For i = 1 To X
Label3.Caption = Label3.Caption & VEC(i) & vbCrLf
Next i
End If
End Sub
Private Sub Command3_Click()
For i = 2 To 10
For j = 10 To 2...
Regístrate para leer el documento completo.