0% found this document useful (0 votes)
85 views1 page

Exercise 1

This code defines a class with a button click event that takes a number from a text box, compares it to values, and sets a label's text based on the comparison. If the number is less than or equal to 9, it sets the label to say it is a one digit number. If the number is greater than or equal to 10, it sets the label to say it is a two digit number. Otherwise, it sets the label to say the number is too big.

Uploaded by

api-310300017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views1 page

Exercise 1

This code defines a class with a button click event that takes a number from a text box, compares it to values, and sets a label's text based on the comparison. If the number is less than or equal to 9, it sets the label to say it is a one digit number. If the number is greater than or equal to 10, it sets the label to say it is a two digit number. Otherwise, it sets the label to say the number is too big.

Uploaded by

api-310300017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Dim less As Single


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
less = TextBox1.Text
If less <= 9 Then
Label2.Text = "The number is a one digit number."
ElseIf less >= 10 Then
Label2.Text = "The number is a two digit number."
Else
Label2.Text = "The number is to big."
End If
End Sub
End Class

You might also like