##Visual Basic, 371 Bytes module m sub main() Dim s as Object for i as Integer=0 to 100 Select Case new System.Random().next(0,9) Case 0 s=1 Case 1 s=2 Case 2 s=5 Case 3 s=10 Case 4 s=15 Case 5 s=20 Case 6 s=25 Case 7 s=50 Case 8 s=500 End Select Console.SetCursorPosition(0,0) console.write("loading "+"-|/"(i mod 4)+" "+i.tostring+" %") system.threading.thread.sleep(s) next end sub end module #Expanded: module m sub main() Dim s as Object for i as Integer=0 to 100 Select Case new System.Random().next(0,9) Case 0 s=1 Case 1 s=2 Case 2 s=5 Case 3 s=10 Case 4 s=15 Case 5 s=20 Case 6 s=25 Case 7 s=50 Case 8 s=500 End Select Console.SetCursorPosition(0,0) console.write("loading " + "-|/"(i mod 4) + " " + i.tostring + " %") system.threading.thread.sleep(s) next end sub end module
Visual Basic, 371 Bytes
module m
sub main()
Dim s as Object
for i as Integer=0 to 100
Select Case new System.Random().next(0,9)
Case 0
s=1
Case 1
s=2
Case 2
s=5
Case 3
s=10
Case 4
s=15
Case 5
s=20
Case 6
s=25
Case 7
s=50
Case 8
s=500
End Select
Console.SetCursorPosition(0,0)
console.write("loading "+"-\|/"(i mod 4)+" "+i.tostring+" %")
system.threading.thread.sleep(s)
next
end sub
end module
Expanded:
module m
sub main()
Dim s as Object
for i as Integer=0 to 100
Select Case new System.Random().next(0,9)
Case 0
s=1
Case 1
s=2
Case 2
s=5
Case 3
s=10
Case 4
s=15
Case 5
s=20
Case 6
s=25
Case 7
s=50
Case 8
s=500
End Select
Console.SetCursorPosition(0,0)
console.write("loading " + "-\|/"(i mod 4) + " " + i.tostring + " %")
system.threading.thread.sleep(s)
next
end sub
end module