fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5.  
  6. Dim age, points As Integer
  7. Console.WriteLine("What is your age?")
  8. age = Int(Console.ReadLine())
  9. Console.WriteLine("How many points do you have on your licence?")
  10. points = Int(Console.ReadLine())
  11. If age > 16 And points < 9 Then
  12. Console.WriteLine("You can drive!")
  13. Else
  14. Console.WriteLine("You are not eligable for a driving licence")
  15. End If
  16. Console.ReadKey()
  17. End Sub
  18. End Class
Runtime error #stdin #stdout #stderr 0.05s 27664KB
stdin
10
stdout
What is your age?
How many points do you have on your licence?
stderr
Unhandled Exception:
System.ArgumentNullException: Value can not be null.
Parameter name: Number
  at Microsoft.VisualBasic.Conversion.Int (System.Object Number) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value can not be null.
Parameter name: Number
  at Microsoft.VisualBasic.Conversion.Int (System.Object Number) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0