JUEGO NUMEROS
                    RANDOMICO




PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()

END

PUBLIC SUB Button1_Click()

 DIM C1, C2, C3 AS Integer

 RANDOMIZE

 C1 = Int(Rnd() * 10)
 TextBox1.Text = C1

 C2 = Int(Rnd() * 10)
 TextBox2.Text = C2

 C3 = Int(Rnd() * 10)
TextBox3.Text = C3

 IF (C1 = C2) THEN
  IF (C1 = C3) THEN
  TextBox5.Text = TextBox4.Text * 2
   Message("GANASTES,EL DOBLE DE LO QUE APOSTASTES", "YA PUEDES COBRAR")
   TextBox1.Clear
   TextBox2.Clear
   TextBox3.Clear
   TextBox4.Clear
   TextBox5.Clear
  ELSE
   IF (C1 = 7) THEN
    IF (C2 = 7) THEN
     IF (C3 = 7) THEN
      TextBox5.Text = TextBox4.Text * 4
      Message("GANASTES EL PRIMER PREMIO", "YA PUEDES COBRAR")
       TextBox1.Clear
       TextBox2.Clear
       TextBox3.Clear
       TextBox4.Clear
       TextBox5.Clear
      ENDIF
     ENDIF
   ENDIF
  ENDIF
 ENDIF
END

PUBLIC SUB Button2_Click()

 ME.Close

END

Juego

  • 1.
    JUEGO NUMEROS RANDOMICO PUBLIC SUB _new() END PUBLIC SUB Form_Open() END PUBLIC SUB Button1_Click() DIM C1, C2, C3 AS Integer RANDOMIZE C1 = Int(Rnd() * 10) TextBox1.Text = C1 C2 = Int(Rnd() * 10) TextBox2.Text = C2 C3 = Int(Rnd() * 10)
  • 2.
    TextBox3.Text = C3 IF (C1 = C2) THEN IF (C1 = C3) THEN TextBox5.Text = TextBox4.Text * 2 Message("GANASTES,EL DOBLE DE LO QUE APOSTASTES", "YA PUEDES COBRAR") TextBox1.Clear TextBox2.Clear TextBox3.Clear TextBox4.Clear TextBox5.Clear ELSE IF (C1 = 7) THEN IF (C2 = 7) THEN IF (C3 = 7) THEN TextBox5.Text = TextBox4.Text * 4 Message("GANASTES EL PRIMER PREMIO", "YA PUEDES COBRAR") TextBox1.Clear TextBox2.Clear TextBox3.Clear TextBox4.Clear TextBox5.Clear ENDIF ENDIF ENDIF ENDIF ENDIF END PUBLIC SUB Button2_Click() ME.Close END