Created
April 13, 2020 08:28
-
-
Save DiZiNnEs/b34cb19ff2115d196c9eba6959016e62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[code] | |
Public Class Form1 | |
Dim Number As Integer | |
Dim One As Integer | |
Dim Two As Integer | |
Dim Answer As Integer | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Number = TextBox1.Text | |
One = Number * Number - Number + 7 | |
Two = Number + 2 | |
Try | |
Answer = One / Two | |
Catch Answer As System.OverflowException | |
MessageBox.Show("Вы попытались поделить значение на НОЛЬ!") | |
Catch Number As System.InvalidCastException | |
MessageBox.Show("Введите integer ЧИСЛО!") | |
Finally | |
MessageBox.Show(Answer) | |
End Try | |
End Sub | |
End Class | |
[/code] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment