Urgente, urgente, por favor ayude a un maestro de VB a escribir código. Acabo de tomar dos clases de VB. El profesor me asignó una pregunta súper BT y no pude entenderla~~~.
¡El profesor asignó una pregunta super bt en sólo dos clases!
1. Genera un número aleatorio de 7 dígitos: 1000000 - 9999999
dim n as Long
Aleatorizar
n = Int( (( 999999999 - 1000000 + 1) * Rnd + 1000000)
2. Genere los resultados en diferentes situaciones:
Si Text1.text = Cstr(n) entonces
Text2.text = "Ganó el premio mayor"
De lo contrario, si Right(Text1.text,6) = right(Cstr(n),6) entonces
Text2.text = " Ganó el segundo premio"
ElseIf Right(Text1.text,5) = right(Cstr(n),5) Then
Text2.text = "Ganó el tercer premio "
ElseIf Right(Text1.text,4) = right(Cstr(n),4 ) Then
Text2.text = "Ganó el cuarto premio"
ElseIf Right(Text1.Text1.text,3) = right(Cstr(n),3) Then
Text2.text = "Ganó el quinto premio"
ElseIf Right ( Text1.text,2) = right(Cstr(n),2) Entonces
Text2.text = "Ganó el sexto premio"