VB.NET
* Public Class Form1

Dim attempts1 As Integer = 0
Dim answer1 As Integer = 12

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim guess1 As Integer = TextBox1.Text

attempts1 = (attempts1 + 1)
Label2.Text = "시도횟수 : " & attempts1

If answer1 = guess1 Then
Label1.Text = "맞음"
ElseIf answer1 < guess1 Then
Label1.Text = guess1 & "보다 낮음"
ElseIf answer1 > guess1 Then
Label1.Text = guess1 & "보다 높음"
End If
End Sub
End Class 

숫자 맞추기 입니다.

정답은 12로 고정되여있습니다.

랜덤한 답이 나오게 코드를 고쳐 보세여. 

 

숫자맞추기.png