Programacion C++
Enviado por juanca9225 • 22 de Septiembre de 2013 • 974 Palabras (4 Páginas) • 238 Visitas
PROBLEMA 3 (09-12-11)
Dim PUNTOS(1 To 10) As Double
Dim A, C, X As Integer
Dim S As Double
Private Sub CMDINGRESAR_CLICK()
X = X + 1
If OPTC.Value = True Then
PUNTOS(A) = 2
Else
OPTC.Value = False
PUNTOS(A) = -1
End If
If OPTA.Value = False Or OPTB.Value = False Or OPTD.Value = False Or OPT.Value = False Then
PUNTOS(A) = 0
End If
If X = 50 Then
CMDNGRESAR.Enabled = False
For C = 1 To 10
S = S + PUNTOS(C)
Next
LBLPUNTAJE.Caption = S
If S >= 10 Then
LBLCONDICION.Caption = "APROBADO"
Else
LBLCONDICION.Caption = "DESAPROBADO"
End If
End If
End Sub
PROBLEMA 2 (3-12-10)
Dim MA(1 To 2, 1 To 2) As Double
Dim MB(1 To 2, 1 To 2) As Double
Dim CA, FA, FB, CB, P, X, Y, M, N As Integer
Private Sub INGRESOA_CLICK()
CA = CA + 1
MA(FA, CA) = Val(TXTNUMA.Text)
TXTNUMA.Text = ""
If CA = 2 Then
CA = 0
FA = FA + 1
End If
If FA = 3 Then
INGRESOA.Enabled = False
INGRESOB.Enabled = True
End If
End Sub
Private Sub INGRESOB_CLICK()
CB = CB + 1
MB(FB, CB) = Val(TXTNUMB.Text)
TXTNUMB.Text = ""
If CB = 2 Then
CB = 0
FB = FB + 1
End If
If FB = 3 Then
INGRESOB.Enabled = False
CMDEJECUTAR.Enabled = True
End If
End Sub
Private Sub CMDEJECUTAR_CLICK()
TIM1.Interval = 1000
CMDEJECUTAR.Enabled = False
End Sub
Private Sub FORM_LOAD()
FA = 1
FB = 1
X = 1
M = 1
CMDEJECUTAR.Enabled = False
INGRESOB.Enabled = False
End Sub
Private Sub TIM1_TIMER()
P = P + 1
If P < 5 Then
Y = Y + 1
LBLUNO.Caption = MA(X, Y)
If Y = 2 Then
Y = 0
X = X + 1
End If
End If
If P > 4 And P <= 8 Then
N = N + 1
LBLUNO.Caption = MB(M, N)
If N = 2 Then
N = 0
M = M + 1
End If
If M = 3 Then
TIM1.Interval = 0
CMDEJECUTAR.Enabled = True
INGRESOA.Enabled = True
INGRESOB.Enabled = True
End If
End If
'If P = 8 Then
' TIM1.Interval = 0
' CMDEJECUTAR.Enabled = True
' INGRESOA.Enabled = True
'INGRESOB.Enabled = True
'End If
End Sub
PROBLEMA 1 (7-12-11)
Dim MA(1 To 2, 1 To 2) As Double
Dim F, C, X, Y, M, N As Integer
Private Sub CMDINGRESAR_Click()
C = C + 1
MA(F, C) = Val(TXTNUMERO.Text)
If C = 2 Then
C = 0
F
...