Sie sind auf Seite 1von 16

Desarrollar un programa en VB tal que permita ingresar los datos de una matriz de orden 18x18 mediante el botn

CMDINGRESAR tal que al finalizar el ingreso del ltimo dato muestre luego de 03 segundos el resultado de la suma de los
cuadrados de los trminos de las 02 diagonales en TXTDIAGONAL e inicie la muestra de todos los elementos de la matriz
espaciados en 03 segundos en TXTELEMENTOS. USAR ARREGLOS.

PARA 2 TIMER
Dim M1(1 to 18, 1 to 18) as Double
Dim F, C, A, B, x, M, L as Integer
Dim sum as Double
Private Sub Form_load()
F=1
M=1
End Sub
Private Sub CMDINGRESAR_click()
C=C+1
M1(F,C)=Val(TXTNUMERO.text)
If C=18 then
F=F+1
C=0
End If
If F=19 then
CMDINGRESAR.Enabled=False
Timer1.interval=3000
Timer2.interval=3000
End If
End Sub

Private Sub Timer1_timer()


For x=1 to 18
sum = sum + (M1(x,x)^2) + (M1(x,19-x)^2)
Next
TXTDIAGONAL.text=sum
Timer1.interval=0
End Sub
Private Sub Timer2_timer()
L=L+1
TXTELEMENTOS.text=(M1(M,L))
If L=18 then
M=M+1
L=0
End If
If M=19 then
Timer2.interval=0
CMDINGRESAR.Enabled=True
End If
End Sub

Desarrollar un programa en VB tal que permita ingresar los datos de una matriz de orden 18x18 mediante el botn
CMDINGRESAR tal que al finalizar el ingreso del ltimo dato muestre luego de 03 segundos muestre el resultado de la suma
de los cuadrados de los trminos de las 02 diagonales en TXTDIAGONAL y luego de 03 segundos muestre el resultado del
producto de todos los elementos de la matriz en TXTELEMENTOS. USAR ARREGLOS.

PARA 2 TIMER

PARA 1 TIMER

Dim M1(1 to 18, 1 to 18) as Double


Dim F, C, A, B, x as Integer
Dim prod, sum as Double

Dim M1(1 to 18; 1 to 18) as Double


Dim F, C, A, P, x, y as Integer
Dim prod, sum as Double

Private Sub Form_load()


F=1
End Sub

Private Sub Form_load()


F=1
End Sub

Private Sub CMDINGRESAR_click()


C=C+1
M1(F,C)=Val(TXTNUMERO.text)
If C=18 then
F=F+1
C=0
End If
If F=19 then
CMDINGRESAR.Enabled=False
Timer1.interval=3000
Timer2.interval=3000
End If
End Sub

Private Sub CMDINGRESAR_click()


C=C+1
M1(F,C)=Val(TXTNUMERO.text)
If C=18 then
F=F+1
C=0
End If
If F=19 then
CMDINGRESAR.Enabled=False
Timer1.interval=3000
End If
End Sub

Private Sub Timer1_timer()


For x=1 to 18
sum = sum + (M1(x,x)^2) + (M1(x,19-x)^2)
Next
TXTDIAGONAL.text=sum
Timer1.interval=0
End Sub
Private Sub Timer2_timer()
prod=1
For A=1 to 18
For B=1 to 18
prod = prod*M1(A,B)
Next
Next
TXTELEMENTOS.text=prod
Timer2.interval=0
CMDINGRESAR.Enabled=True
End Sub

Private Sub Timer1_timer()


If P=0 then
For A=1 to 18
sum = sum + (M1(A,A)^2) + (M1(A,19-A)^2)
Next
TXTDIAGONAL.text=sum
End If
If P=1 then
prod=1
For x=1 to 18
For y=1 to 18
prod = prod*M1(x,y)
Next
Next
TXTELEMENTOS.text=prod
Timer1.interval=0
CMDINGRESAR.Enabled=True
End If
End Sub

Desarrollar un programa en VB talque permita ingresar los datos de una matriz cuadrada de orden 8 mediante
le boton CMDINGRESAR tal que luego de finalizar el ingreso de los datos. Muestre en TXTELEMENTOS los cubos
de cada elemento de la matriz espaciados en 1 segundo y en TXTDIAGONAL la suma de los elementos de cada
columna de la matriz espaciados 3 segundos. USAR ARREGLOS.

PARA 2 TIMER
Dim M1(1 to 8, 1 to 8) as Double
Dim F, C, L, M, x, t as Integer
Dim sum as Double
Private Sub Form_load()
F=1
M=1
End Sub
Private Sub CMDINGRESAR_click()
C=C+1
M1(F,C)=Val(TXTNUMERO.text)
If C=8 then
F=F+1
C=0
End If
If F=9 then
CMDINGRESAR.Enabled=False
Timer1.interval=1000
Timer2.interval=3000
End If
End Sub

Private Sub Timer1_timer()


L=L+1
TXTELEMENTOS.text=(M1(M,L)^3)
If L=8 then
M=M+1
L=0
End If
If M=9 then
Timer1.interval=0
CMDINGRESAR.Enabled=True
End If
End Sub
Private Sub Timer2_timer()
t=t+1
sum=0
For x=1 to 8
sum = sum + (M1(x,t))
Next
TXTDIAGONAL.text=sum
if t= 9 then
Timer2.interval=0
CMDINGRESAR.Enabled=True
End If
End Sub

Desarrollar un programa en VB tal que permita ingresar los datos de una matriz de orden 10 mediante el botn
CMDINGRESAR tal que al finalizar el ingreso de los datos muestre en TXTELEMENTOS los cuadrados de los elementos de
toda la matriz espaciados en 01 segundo y en TXTDIAGONAL los cubos de los elementos de la diagonal principal espaciados
en 03 segundos. USAR ARREGLOS.

PARA 2 TIMER
Dim M1(1 to 10, 1 to 10) as Double
Dim F, C, L, M, t as Integer
Dim sum as Double
Private Sub Form_load()
F=1
M=1
End Sub
Private Sub CMDINGRESAR_click()
C=C+1
M1(F,C)=Val(TXTNUMERO.text)
If C=10 then
F=F+1
C=0
End If
If F=11 then
CMDINGRESAR.Enabled=False
Timer1.interval=1000
Timer2.interval=3000
End If
End Sub

Private Sub Timer1_timer()


L=L+1
TXTELEMENTOS.text=(M1(M,L)^2)
If L=10 then
M=M+1
L=0
End If
If L=11 then
Timer1.interval=0
End If
End Sub
Private Sub Timer2_timer()
t=t+1
TXTDIAGONAL.text=(M1(t,t)^3)
If t=11 then
Timer2.interval=0
End If
End Sub

Desarrollar un programa en VB talque luego de ingresar los datos de 02 matrices cuadradas de orden 6 medante TXTNUMA
e INGRESO-A (para la matriz A) y TXTNUMB e INGRESO-B (para la matriz B), al finalizar el ingreso de todos los datos, luego
de pulsar CMDEJECUTAR, muestre en LBLUNO todos los elementos de la matriz resultante de la suma de las 02 matrices
espaciados 2 segundos. USAR ARREGLOS.

PARA 2 TIMER
Dim
Dim
Dim
Dim

M1(1 to 6, 1 to 6) as Double
M2(1 to 6, 1 to 6) as Double
F, C, x, y, M, N as Integer
prod, sum as Double

Private Sub Form_load()


F=1
x=1
M=1
End Sub
Private Sub CMDINGRESOA_click()
C=C+1
M1(F,C)=Val(TXTNUMA.text)
If C=6 then
F=F+1
C=0
End If
If F=7 then
CMDINGRESOA.Enabled=False
End If
End Sub
Private Sub CMDINGRESOB_click()
y=y+1
M2(x,y)=Val(TXTNUMB.text)
If y=6 then
x=x+1
y=0
End If
If x=7 then
CMDINGRESOB.Enabled=False
End If
End Sub

Private Sub CMDEJECUTAR_click()


Timer1.interval=2000
CMDEJECUTAR.Enabled=False
End Sub
Private Sub Timer1_timer()
N=N+1
LBLUNO.caption=M1(M,N)+M2(M,N)
If N=6 then
M=M+1
N=0
End If
If M=7 then
CMDEJECUTAR.Enabled=True
CMDINGRESOA.Enabled=True
CMDINGRESOB.Enabled=True
Timer1.interval=0
End If
End Sub

Desarrollar un programa en VB talque luego de ingresar los datos de 02 matrices cuadradas de orden 8 medante TXTNUMA
e INGRESO-A (para la matriz A) y TXTNUMB e INGRESO-B (para la matriz B), al finalizar el ingreso de todos los datos, luego
de pulsar CMDEJECUTAR, muestre en LBLUNO la suma de la raiz cuadrada de todos los elementos de las 2 matrices despues
de 04 segundos. USAR FUNCIONES O PROCEDIMIENTOS.

Dim
Dim
Dim
Dim

M1(1 to 8, 1 to 8) as Double
M2(1 to 8, 1 to 8) as Double
F, C, A, B, x, y as Integer
sum as Double

Private Sub Form_load()


F=1
A=1
End Sub
Private Sub CMDINGRESOA_click()
C=C+1
M1(F,C)=Val(TXTNUMA.text)
If C=8 then
F=F+1
C=0
End If
If F=9 then
CMDINGRESOA.Enabled=False
End If
End Sub
Private Sub CMDINGRESOB_click()
B=B+1
M2(A,B)=Val(TXTNUMB.text)
If B=8 then
A=A+1

B=0
End If
If A=9 then
CMDINGRESOB.Enabled=False
End If
End Sub
Private Sub CMDEJECUTAR_click()
Timer1.interval=4000
CMDEJECUTAR.Enabled=False
End Sub
Private Sub Timer1_timer()
For x=1 to 8
For y=1 to 8
sum = sum + (M1(x,y)^(1/2)) +
(M2(x,y)^(1/2))
Next
Next
LBLUNO.caption=sum
Timer1.interval=0
CMDEJECUTAR.Enabled=True
CMDINGRESOA.Enabled=True
CMDINGRESOB.Enabled=True
End Sub

Desarrollar un programa en VB talque luego de ingresar los datos de 02 matrices cuadradas de orden 12 medante TXTNUMA
e INGRESO-A (para la matriz A) y TXTNUMB e INGRESO-B (para la matriz B), al finalizar el ingreso de todos los datos, luego
de pulsar CMDEJECUTAR, muestre luego de 01 segundos la suma de las 2 diagonales de cada matriz en LBLUNO, luego de
02 segundos muestre el producto de los elementos de las 4 primeras COLUMNAS de las 2 matrices en LBLDOS y luego de 03
segundos muestre el promedio de todos los elementos de las 2 matrices en LBLTRES (solo usar 1 timer). USAR ARREGLOS.

Dim M1(1 to 12, 1 to 12) as Double


Dim M2(1 to 12, 1 to 12) as Double
Dim F, C, A, B, t, x, y, z, m, n as
Integer
Dim sum, prod, prom as Double
Private Sub Form_load()
F=1
A=1
prod=1
End Sub
Private Sub CMDINGRESOA_click()
C=C+1
M1(F,C)=Val(TXTNUMA.text)
If C=12 then
F=F+1
C=0
End If
If F=13 then
CMDINGRESOA.Enabled=False
End If
End Sub
Private Sub CMDINGRESOB_click()
B=B+1
M2(A,B)=Val(TXTNUMB.text)
If B=12 then
A=A+1
B=0
End If
If A=13 then
CMDINGRESOB.Enabled=False
End If
End Sub

Private Sub CMDEJECUTAR_click()


Timer1.interval=1000
CMDEJECUTAR.Enabled=False
End Sub
Private Sub Timer1_timer()
t=t+1
If t= 1 then
For x=1 to 12
sum = sum + M1(x,x) + M2(x,x)
Next
LBLUNO.caption=sum
End If
If t=2 then
For y= 1 to 4
For z= 1 to 12
prod = prod*M1(z,y)*M2(z,y)
Next
Next
LBLDOS.caption=prod
End If
If t=3 then
For m=1 to 12
For n=1 to 12
prom = prom + M1(m,n) + M2(m,n)
Next
Next
LBLTRES.caption=prom/288
Timer1.interval=0
CMDEJECUTAR.Enabled=True
CMDINGRESOA.Enabled=True
CMDINGRESOB.Enabled=True
End If
End Sub

Desarrollar un programa en VB talque luego de


ingresar los datos de 02 matrices cuadradas de
orden 6 medante TXTNUMA e INGRESO-A (para la
matriz A) y TXTNUMB e INGRESO-B (para la matriz
B), al finalizar el ingreso de todos los datos, luego
de pulsar CMDEJECUTAR, muestre en LBLUNO la
suma de la raiz cubica de todos los elementos de
las 2 matrices despues de 2 segundos. USAR
ARREGLOS.

Dim
Dim
Dim
Dim

M1(1 to 6; 1 to 6) as Double
M2(1 to 6; 1 to 6) as Double
F, C, A, B, x, y, as Integer
sum as Double

Private Sub Form_load()


F=1
A=1
End Sub
Private Sub CMDINGRESOA_click()
C=C+1
M1(F,C)=Val(TXTNUMA.text)
If C=6 then
F=F+1
C=0
End If
If F=7 then
CMDINGRESOA.Enabled=False
End If
End Sub

Private Sub CMDINGRESOB_click()


B=B+1
M2(A,B)=Val(TXTNUMB.text)
If B=6 then
A=A+1
B=0
End If
If A=7 then
CMDINGRESOB.Enabled=False
End If
End Sub
Private Sub CMDEJECUTAR_click()
Timer1.interval=2000
CMDEJECUTAR.Enabled=False
End Sub
Private Sub Timer1_timer()
For x=1 to 6
For y=1 to 6
sum = sum + (M1(x,y)^(1/3)) +
(M2(x,y)^(1/3))
Next
Next
LBLUNO.caption=sum
Timer1.interval=0
CMDEJECUTAR.Enabled=True
CMDINGRESOA.Enabled=True
CMDINGRESOB.Enabled=True
End Sub

Desarrollar un programa en VB tal que permita ingresar mediante el boton INGRESAR los datos de un numero
indeterminado de personas (al final se ingresara necesariamente los 3 datos en blanco). Luego de culminar el
ingreso de datos mostrar en TXTRESULTADO el producto de edades de las personas de sexo femenino y que sus
edades sean mayores de 30 aos, despues de 05 segundos y en LSTUNO mostrar los nombres de las personas
de sexo femenino que sus edades esten entre 20 y 30 aos espaciadas en 02 segundos c/nombre.

Desarrollar un programa en VB tal que permita determinar la evaulacion de una persona ingresando en TXTNOMBRE el
nombre de la persona y en TXTPREGUNTA el numero de la pregunta a contestar y luego de seleccionar o no una de las
opciones, pulse el boton CMDINGRESAR para permitir el ingreso de la respuesta a esa pregunta, el examen consta de 50
preguntas con 4 opciones cada una, el puntaje se calcuara de la siguiente manera: 2 pts Rpta correcta, -1 pts Rpta
incorrecta, 0 pts Rpta No contestada. Al finalizar el ingreso de las 50 respuestas del examen, mostrara en LBLPUNTAJE el
puntaje obtenido y en LBLCONDICION la condicion del examinado (APROBADO o DESAPROBADO), se aprueba con 60
puntos. NOTA: la clave de respuestas correctas para las 50 preguntas es la opcion C. USAR ARREGLOS.

Dim NOMBRE(1 to 800) as String


Dim PREGUNTA(1 to 50) as Integer
Dim P, Q, PUNT, i as Integer
Private Sub CMDINGRESAR_click()
P=P+1
NOMBRE(P) = TXTNOMBRE.text
Q=Q+1
PREGUNTA(Q) = Val(TXTPREGUNTA.text)
If P=800 then
For i=1 to 50
If OPTA.value=True then
PUNT=PUNT-1
End If
If OPTB.value=True then
PUNT=PUNT-1
End If
If OPTC.value=True then
PUNT=PUNT+2
End If
If OPTD.value=True then
PUNT=PUNT-1
End If
Next
If PUNT<60 then
LBLPUNTAJE.caption=PUNT
LBLCONDITION.caption=DESAPROBADO
End If
If PUNT>60 then
LBLPUNTAJE.caption=APROBADO
End If
End If
End Sub

Desarrollar un programa en VB tal que permita ingresar los datos de 150 personas mediante el boton INGRESAR, luego de
culminar el ingreso de datos mostrar en TXTRESULTADO el promedio de las edades de las personas de sexo masculino y
que sus edades esten entre 20 y 30 aos despues de 03 segundos y en LSTUNO mostrar los nombres de las personas de
sexo femenino mayores de 20 aos espaciadas en 03 segundos c/nombre.

Dim NOMBRE (1 to 150) as String +2


Dim EDAD (1 to 150) as Integer
Dim SEXO (1 to 150) as String +1
Dim P, L, K as Integer
Private Sub CMDINGRESAR_click()
P=P+1
NOMBRE(P)=TXTN.text
EDAD(P)=Val(TXTE.text)
SEXO(P)=TXTS.text
If P=150 then
For i=1 to 150
If SEXO(i) = M and EDAD(i)>20 and EDAD(i)<30 then
L=L+1
FIN(L)=NOMBRE(i)
End If

Desarrollar un programa en VB tal que permita ingresar los datos de un numero indeterminado de personas mediante el
boton INGRESAR (al final se ingresara necesariamente los 3 datos en blanco), luego de culminar el ingreso de datos
mostrar en TXTRESULTADO el producto de las edades de las personas de sexo femenino y que sus edades sean mayores
de 18 aos despues de 05 segundos y en LSTUNO mostrar los nombres de las personas de sexo femenino que sus edades
esten entre 20 y 30 aos espaciadas en 02 segundos c/nombre.

Dim
Dim
Dim
Dim

NOMBRE (1 to x) as String +2
EDAD (1 to x) as Integer
SEXO (1 to x) as String +1
P, L, K as Integer

Private Sub CMDINGRESAR_click()


P=P+1
NOMBRE(P)=TXTN.text
EDAD(P)=Val(TXTE.text)
SEXO(P)=TXTS.text
If P=x then
For i=1 to x
If SEXO(i) = F and EDAD(i)>18 then
P=P*EDAD(i)
End If
If SEXO(i) = F and EDAD(i)>20 and EDAD(i)<30
L=L+1
RESULT(L)=NOMBRE(i)
End If
Next
Timer1.interval=5000
Timer2.interval=2000
End If
End Sub
Private Sub Timer1_timer()
TXTRESULTADO.text=P
Timer1.interval=0
End Sub
Private Sub Timer2_timer()
k=k+1
LSTUNO.Additem.RESULT(L)
If K=L then
Timer2.interval=0
End If
End Sub

Desarrollar un programa en VB tal que permita ingresar los datos de un numero indeterminado de personas mediante el
boton INGRESAR (al final se ingresara necesariamente los 4 datos en blanco), luego de culminar el ingreso de datos
mostrar en LBLUNO la suma del cuadrado de las edades de las personas de sexo femenino y que sus edades sean menores
de 60 aos despues de 03 segundos y en TXTDOS mostrar los nombres de las personas de sexo femenino que sus edades
esten entre 18 y 25 aos y que su domicilo sea en el Rimac o Surco espaciadas en 02 segundos c/nombre.
Dim NOMBRE (1 to x) as String +2
Dim EDAD (1 to x) as Integer
Dim SEXO (1 to x) as String +1
Dim P, L, K as Integer
Private Sub CMDINGRESAR_click()
P=P+1
NOMBRE(P)=TXTN.text
EDAD(P)=Val(TXTE.text)
SEXO(P)=TXTS.text
DISTRITO(P)=TXTD.text
If P=x then
For i=1 to x
If SEXO(i) = F and EDAD(i)<60 then
SEF=SEF + EDAD(i)*EDAD(i)
End If
If SEXO(i) = F and EDAD(i)>18 and EDAD(i)<25 and DISTRITO(i)=Surco or Rimac
L=L+1
RESULT(L)=NOMBRE(i)
End If
Next
Timer1.interval=3000
Timer2.interval=2000
End If
End Sub
Private Sub Timer1_timer()
LBLUNO.caption=SEF
Timer1.interval=0
End Sub
Private Sub Timer2_timer()
k=k+1
TXTDOS.text = RESULT(L)
If K=L then
Timer2.interval=0
End If
End Sub

Desarrollar un programa en VB tal que luego de ingresar los votos de 70 personas en relacion al color de la camisa y pantalon
mediante las opciones que se muestran en el formulario y mediante el boton INGRESAR de tal manera que inmediatamente
luego de ingresar el ultimo voto muestre los resultados del color y numero de votos del color con mayor votos de la camisa
luego de 02 segundos y los resultados del pantalon luego de 04 segundos. USAR ARREGLOS.

Dim CR, CA, CV, CB, PR, PA, PV, PB, i, m as


integer
Private Sub form_load()
timer1.interval=0
timer2.interval=0
CR=CA=CV=CB=PR=PA=PV=PB=i=m=0
End Sub
Private Sub CMDINGRESAR_click()
m=m+1
if OPTCROJO.value=true then
CR=CR+1
End If
if OPTCAZUL.value=true then
CA=CA+1
End If
if OPTCVERDE.value=true then
CV=CV+1
End If
if OPTCBLANCO.value=true then
CB=CB+1
End If
if OPTPROJO.value=true then
PR=PR+1
End If
if OPTPAZUL.value=true then
PA=PA+1
End If
if OPTPVERDE.value=true then
PV=PV+1
End If
if OPTPBLANCO.value=true then
PB=PB+1
End If
if m=70 then
timer1.interval=1000
timer2.interval=2000
End if
End Sub

Private Sub Timer1_Timer()


if CR>CA and CR>CV and CR>CB
TXTVOTOSCAMISA.text=CR
TXTCOLORCAMISA.text=ROJO
End If
if CA>CR and CA>CV and CA>CB
TXTVOTOSCAMISA.text=CA
TXTCOLORCAMISA.text=AZUL
End If
if CV>CA and CV>CR and CV>CB
TXTVOTOSCAMISA.text=CV
TXTCOLORCAMISA.text=VERDE
End If
if CB>CA and CB>CV and CB>CR
TXTVOTOSCAMISA.text=CB
TXTCOLORCAMISA.text=BLANCO
End If
End Sub
Private Sub Timer2_Timer()
if PR>PA and PR>PV and PR>PB
TXTVOTOSCAMISA.text=PR
TXTCOLORCAMISA.text=ROJO
End If
if PA>PR and PA>PV and PA>PB
TXTVOTOSCAMISA.text=PA
TXTCOLORCAMISA.text=AZUL
End If
if PV>PA and PV>PR and PV>PB
TXTVOTOSCAMISA.text=PV
TXTCOLORCAMISA.text=VERDE
End If
if PB>PA and PB>PV and PB>PR
TXTVOTOSCAMISA.text=PB
TXTCOLORCAMISA.text=BLANCO
End If
End Sub

then

then

then

then

then

then

then

then

Desarrollar un programa en VB tal que luego de ingresar los votos de 100 personas en relacion al color de la camisa y
pantalon mediante las opciones que se muestran en el formulario y mediante el boton INGRESAR de tal manera que
inmediatamente luego de ingresar el ultimo voto muestre los resultados del color y numero de votos del color con mayor
votos de la camisa luego de 03 segundos y los resultados del pantalon luego de 08 segundos. USAR ARREGLOS.

Dim CAMISA(1 to 4) as Double


Dim PANTALON(1 to 4) as Double
Dim P, R, x, y, A, B, Q, L, K, M, N,
I, j, T as Integer
Private Sub CMDINGRESAR_click()
timer1.interval=3000
timer2.interval=8000
CMDINGRESAR.Enables=False
End Sub
Private Sub Timer1_timer()
P=P+1
If OPTCROJO.value=true then
R=1
x=x+1
CAMISA(R)=x
Else
If OPTCAZUL.value=true then
R=2
y=y+1
CAMISA(R)=y
Else
If OPTCVERDE.value=true then
R=3
A=A+1
CAMISA(R)=A
Else
If OPTCBLANCO.value=true then
R=4
B=B+1
CAMISA(R)=B
End If
End If
End If
End If
If P=100 then
if Q=1 then
If CAMISA(Q)>CAMISA(Q+1) and
CAMISA(Q)>CAMISA(Q+2) and
CAMISA(Q)>CAMISA(Q+3) then
TXTVOTOSCAMISA.text=CAMISA(Q)
TXTCOLORCAMISA.text=ROJO
Else

If CAMISA(Q+1)>CAMISA(Q) and
CAMISA(Q+1)>CAMISA(Q+2) and
CAMISA(Q+1)>CAMISA(Q+3) then
TXTVOTOSCAMISA.text=CAMISA(Q+1)
TXTCOLORCAMISA.text=AZUL
Else
If CAMISA(Q+2)>CAMISA(Q+1) and
CAMISA(Q+2)>CAMISA(Q) and
CAMISA(Q+2)>CAMISA(Q+3) then
TXTVOTOSCAMISA.text=CAMISA(Q+2)
TXTCOLORCAMISA.text=VERDE
Else
If CAMISA(Q+3)>CAMISA(Q+1) and
CAMISA(Q+3)>CAMISA(Q+2) and
CAMISA(Q+3)>CAMISA(Q) then
TXTVOTOSCAMISA.text=CAMISA(Q+3)
TXTCOLORCAMISA.text=BLANCO
End If
End If
End If
End If
End If
End If
Timer1.interval=0
End Sub
Private Sub Timer2_timer()
L=L+1
If OPTPROJO.value=true then
K=1
M=M+1
PANTALON(K)=M
Else
If OPTPAZUL.value=true then
K=2
N=N+1
PANTALON (K)=N
Else
If OPTPVERDE.value=true then
K=3
i=i+1
PANTALON (K)=i
Else
If OPTPBLANCO.value=true then

K=4
j=j+1
PANTALON (K)=j
End If
End If
End If
End If
If L=100 then
if T=1 then
If PANTALON(T)>PANTALON(T+1) and
PANTALON(T)>PANTALON(T+2) and
PANTALON(T)>PANTALON(T+3) then
TXTVOTOSPANTALON.text=PANTALON(T)
TXTCOLORPANTALON.text=ROJO
Else
If PANTALON(T+1)>PANTALON(T) and
PANTALON(T+1)>PANTALON(T+2) and
PANTALON(T+1)>PANTALON(T+3) then
TXTVOTOSPANTALON.text=PANTALON(T+1)
TXTCOLORPANTALON.text=AZUL
Else
If PANTALON(T+2)>PANTALON(T+1) and
PANTALON(T+2)>PANTALON(T) and
PANTALON(T+2)>PANTALON(T+3) then
TXTVOTOSPANTALON.text=PANTALON(T+2)
TXTCOLORPANTALON.text=VERDE
Else
If PANTALON(T+3)>PANTALON(T+1) and
PANTALON(T+3)>PANTALON(T+2) and
PANTALON(T+3)>PANTALON(T) then
TXTVOTOSPANTALON.text=PANTALON(T+3)
TXTCOLORPANTALON.text=BLANCO
End If
End If
End If
End If
End If
End If
CMDINGRESAR.Enable=True
Timer2.interval=0
End Sub

Desarrollar un programa en VB tal tue luego de ingresar un numero de 04 cifras obligatoriamente en TXTNUMERO, luego
de pulsar CMDEJECUTAR muestre luego de 01 segundo en LBLNUMEROINVERSO el mismo nmero pero escrito al revs,
luego de 02 segundos muestre el valor del factorial del numero en LBLFACTORIAL y finalmente luego de 03 segundos
muestre en LBLSUMACIFRAS la suma de las cifras tue componen el numero ingresado (solo se permite usar un timer)

Das könnte Ihnen auch gefallen