Module Module1
Sub Main()
Dim side_of_cube, volume_ofcube As Double
Console.Write("Enter value of side of cube: ")
side_of_cube = Double.Parse(Console.ReadLine())
volume_ofcube = side_of_cube * side_of_cube * side_of_cube
Console.WriteLine("Value of volume of cube: " & volume_ofcube)
Console.WriteLine()
Shell("cmd /c pause", AppWinStyle.NormalFocus, True)
End Sub
End Module
My guess is:
Sub Main()
Dim side_of_cube, volume_ofcube As Double
Console.Write("Enter value of side of cube: ")
side_of_cube = Double.Parse(Console.ReadLine())
Try
volume_ofcube = side_of_cube * side_of_cube * side_of_cube
Catch volume_ofcube
Console.WriteLine("Value of volume of cube: " & volume_ofcube)
Finally
Console.WriteLine()
Shell("cmd /c pause", AppWinStyle.NormalFocus, True)
End Sub
End Module
This post has been edited by Atli: 19 January 2013 - 03:37 PM
Reason for edit:: Use [code] tags when posting code.

New Topic/Question
Reply



MultiQuote




|