fork download
  1. imports System
  2. public class MainClass
  3. public shared sub Main()
  4.  
  5. Module Example
  6. Public Sub Main()
  7. Dim rnd As New Random()
  8.  
  9. Console.WriteLine("20 random integers from -100 to 100:")
  10. For ctr As Integer = 1 To 20
  11. Console.Write("{0,6}", rnd.Next(-100, 101))
  12. If ctr Mod 5 = 0 Then Console.WriteLine()
  13. Next
  14. Console.WriteLine()
  15.  
  16. Console.WriteLine("20 random integers from 1000 to 10000:")
  17. For ctr As Integer = 1 To 20
  18. Console.Write("{0,8}", rnd.Next(1000, 10001))
  19. If ctr Mod 5 = 0 Then Console.WriteLine()
  20. Next
  21. Console.WriteLine()
  22.  
  23. Console.WriteLine("20 random integers from 1 to 10:")
  24. For ctr As Integer = 1 To 20
  25. Console.Write("{0,6}", rnd.Next(1, 11))
  26. If ctr Mod 5 = 0 Then Console.WriteLine()
  27. Next
  28. End Sub
  29. End Module
  30. ' The example displays output similar to the following:
  31. ' 20 random integers from -100 to 100:
  32. ' 65 -95 -10 90 -35
  33. ' -83 -16 -15 -19 41
  34. ' -67 -93 40 12 62
  35. ' -80 -95 67 -81 -21
  36. '
  37. ' 20 random integers from 1000 to 10000:
  38. ' 4857 9897 4405 6606 1277
  39. ' 9238 9113 5151 8710 1187
  40. ' 2728 9746 1719 3837 3736
  41. ' 8191 6819 4923 2416 3028
  42. '
  43. ' 20 random integers from 1 to 10:
  44. ' 9 8 5 9 9
  45. ' 9 1 2 3 8
  46. ' 1 4 8 10 5
  47. ' 9 7 9 10 5
  48.  
  49. ' Console.WriteLine("Hello, World!")
  50. ' dim n as Integer
  51. ' n=Console.ReadLine
  52. ' dim i as Integer
  53. ' for i=0 to n step 1
  54. ' dim r as Double
  55. ' r=Math.Exp(Math.Log(2)*i)
  56. ' Console.Write(Math.Round(r))
  57. ' Console.Write(" ")
  58. ' next i
  59. ' end sub
  60. 'end class
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
30
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/3VmXdp/prog.vb (5,15) : Error VBNC90019: Expected 'End'.
Error recovery not implemented yet.
/home/3VmXdp/prog.vb (5,15) : Error VBNC30205: Expected end of statement.
Error recovery not implemented yet.
/home/3VmXdp/prog.vb (60,11) : Error VBNC90019: Expected 'End'.
Error recovery not implemented yet.
There were 3 errors and 0 warnings.
Compilation took 00:00:00.6762730
stdout
Standard output is empty