Programa.vbs

Esto es un programa hecho por un alumno de 1ºE en bloc de notas. Consta de un test que obliga a hacerlo. El lenguaje de programación es Visual Basic (.vbs). En caso de querer ejecutarlo, se necesitara un ordenador. Luego abrir bloc de notas y pegar el código. Luego lo guardas como un archivo .vbs y lo ejecutas.

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

while a=vbNo

  a = msgbox ("Mentira!!" ,0+48, "Pregunta")

  a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

wend


while a=vbYes

  b = msgbox ("Ok, quieres hacer un test?" ,4+32, "Pregunta")

  if b=vbYes then

c = msgbox ("2+2=4?" ,4+32, "Pregunta 1")

if c=vbYes then

c = msgbox ("Correcto" ,0, "Respuesta")

d = msgbox ("3x7=21?" ,4+32, "Pregunta 2")

if d=vbYes then

d = msgbox ("Correcto" ,0, "Respuesta")

e = msgbox ("2^10=1.026?" ,4+32, "Pregunta 3")

if e=vbNo then

e = msgbox ("Correcto" ,0, "Respuesta")

f = msgbox ("3/3, Bien hecho!" ,0, "Buen trabajo")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

if e=vbYes then

e = msgbox ("incorrecto" ,0, "Respuesta")

f = msgbox ("2/3, Buen trabajo!" ,0, "Buen trabajo")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

end if

if d=vbNo then

d = msgbox ("incorrecto" ,0, "Respuesta")

e = msgbox ("2^10=1.026?" ,4+32, "Pregunta 3")

if e=vbNo then

e = msgbox ("Correcto" ,0, "Respuesta")

f = msgbox ("2/3, Buen trabajo!" ,0, "Buen trabajo")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

if e=vbYes then

e = msgbox ("incorrecto" ,0, "Respuesta")

f = msgbox ("1/3, Te saldra mejor la proxima vez!" ,0, "Buen intento")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

end if

end if

if c=vbNo then

c = msgbox ("inCorrecto" ,0, "Respuesta")

d = msgbox ("3x7=21?" ,4+32, "Pregunta 2")

if d=vbYes then

d = msgbox ("Correcto" ,0, "Respuesta")

e = msgbox ("2^10=1.026?" ,4+32, "Pregunta 3")

if e=vbNo then

e = msgbox ("Correcto" ,0, "Respuesta")

f = msgbox ("2/3, Buen Trabajo!" ,0, "Buen trabajo")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

if e=vbYes then

e = msgbox ("incorrecto" ,0, "Respuesta")

f = msgbox ("1/3, Te saldra mejor la proxima vez!" ,0, "Buen Intento")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

end if

if d=vbNo then

d = msgbox ("incorrecto" ,0, "Respuesta")

e = msgbox ("2^10=1.026?" ,4+32, "Pregunta 3")

if e=vbNo then

e = msgbox ("Correcto" ,0, "Respuesta")

f = msgbox ("1/3, Te saldra mejor la proxima vez!" ,0, "Buen Intento")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

if e=vbYes then

e = msgbox ("incorrecto" ,0, "Respuesta")

f = msgbox ("0/3, estudia!" ,0, "Estudia!")

g = msgbox ("Quieres reintentar?" ,2, "Reintentar?")

if g=vbRetry then

a = msgbox ("Eres inteligente" ,4+32, "Pregunta")

else

g = msgbox ("Hasta otra!" ,0, "Adios")

end if

end if

end if

end if

end if

wend