fork download
  1. Private Sub Command1_Click()
  2. Dim N, D As Single
  3. Dim tag As String
  4.  
  5. N = Val(TxtNumber.Text)
  6.  
  7. Select Case N
  8. Case Is < 2
  9. Lbl_Answer.Caption = "It is not a prime number"
  10.  
  11. Case Is = 2
  12. Lbl_Answer.Caption = "It is a prime number"
  13.  
  14. Case Is > 2
  15. D = 2
  16. Do
  17. If N / D = Int(N / D) Then
  18. Lbl_Answer.Caption = "It is not a prime number"
  19. tag = "Not Prime"
  20. Exit Do
  21. End If
  22. D = D + 1
  23.  
  24. Loop While D <= N - 1
  25. If tag <> "Not Prime" Then
  26. Lbl_Answer.Caption = "It is a prime number"
  27. End If
  28. End Select
  29. End Sub
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


/home/P9UqKe/prog.vb (1,13) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (2,4) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (3,4) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (5,2) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (7,7) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (8,5) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (9,11) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (11,5) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (12,11) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (14,5) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (15,2) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (16,3) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (17,3) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (18,11) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (19,4) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (20,5) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (21,7) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (22,2) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (24,5) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (25,3) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (26,11) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (27,7) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (28,11) : Error VBNC30203: Not valid as identifier.
/home/P9UqKe/prog.vb (29,8) : Error VBNC30203: Not valid as identifier.
There were 24 errors and 0 warnings.
Compilation took 00:00:00.6322210
stdout
Standard output is empty