Pregunta 1
Pregunta
1.- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
REM ¿QUÉ VALOR DE X SE IMPRIME?
Dim X As Integer
For X = 1 To 5
Next
MessageBox.Show(" X = " & X)
End Sub
Pregunta 2
Pregunta
2.- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
REM CUANTOS ASTERISCOS IMPRIME EL PROGRAMA?
Dim X As Integer
For X = 3 To 1
MessageBox.Show("*")
Next
End Sub
Pregunta 3
Pregunta
3.- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
REM ¿QUÉ VALOR DE X SE IMPRIME?
Dim X As Integer
X = 5
X = X + 2
X = -1
MessageBox.Show("X = " & X)
End Sub
Pregunta 4
Pregunta
4.- Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
REM CUANTOS ASTERISCOS IMPRIME EL PROGRAMA?
Dim X As Integer
For X = 5 To 7 Step 2
MessageBox.Show("*")
Next
End Sub
Pregunta 5
Pregunta
5.- Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
REM ¿QUÉ IMPRIME ESTE PROGRAMA?
Dim X As Integer
X = 5 + 3
X = X + X
If X > 16 Then
MessageBox.Show(" # ")
Else
MessageBox.Show(" $ ")
End If
End Sub
Pregunta 6
Pregunta
6.- Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
REM ¿QUÉ VALOR DE Y SE IMPRIME? 2
Dim X As Integer
Dim Y As Integer
X = 5
Y = 2
X = Y
Y = X
MessageBox.Show("Y = " & Y)
End Sub
Pregunta 7
Pregunta
7.- Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
REM ¿QUÉ SECUENCIA DE CARACTERES IMPRIME ESTE PROGRAMA?
Dim X As Integer
Dim Y As Integer
MessageBox.Show("%")
If X > Y Then
MessageBox.Show(">")
Else
MessageBox.Show("<")
End If
MessageBox.Show("*")
End Sub
Pregunta 8
Pregunta
8.- Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
REM ¿QUÉ VALOR DE X IMPRIME ESTE PROGRAMA?
Dim X As Integer
X = 8
Select Case X
Case 1 To 7
X = X + 1
Case Is > 7
X = X + 2
Case Else
X = X + 3
End Select
X = X + 1
MessageBox.Show("X = " & X)
End Sub
Pregunta 9
Pregunta
9.- Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
REM ¿CUÁNTOS * IMPRIME ESTE PROGRAMA?
Dim X As Integer
Do
MessageBox.Show(" * ")
Loop While X > 1
End Sub
Pregunta 10
Pregunta
10.- Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
REM ¿QUÉ IMPRIME EL SIGUIENTE PROBLEMA?
Dim X As Double
Dim Y As Integer
X = 3.1416
Y = X + 1
MessageBox.Show(" Y = " & Y)
End Sub
End Class