Zusammenfassung der Ressource
Frage 1
Frage
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
Frage 2
Frage
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
Frage 3
Frage
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
Frage 4
Frage
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
Frage 5
Frage
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
Frage 6
Frage
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
Frage 7
Frage
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
Frage 8
Frage
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
Frage 9
Frage
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
Frage 10
Frage
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