Imports System
Public Class MainClass
Shared Sub Main(ByVal args As String())
Try
Dim numerator As Integer = Convert.ToInt32("00q")
Dim denominator As Integer = Convert.ToInt32("0")
Dim result As Integer = numerator \ denominator
Console.WriteLine (result)
Catch formattingException As FormatException
Console.WriteLine("You must enter two integers")
Catch dividingException As DivideByZeroException
Console.WriteLine(dividingException.Message)
End Try
End Sub
End Class
|