Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
30
Task/Integer-sequence/QB64/integer-sequence.qb64
Normal file
30
Task/Integer-sequence/QB64/integer-sequence.qb64
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
Const iMax = 32767, UiMax = 65535
|
||||
Const lMax = 2147483647, UlMax = 4294967295
|
||||
Const iQBMax = 9223372036854775807, UiQBMax = 1844674407309551615
|
||||
|
||||
|
||||
Dim iNum As _Integer64, iCount As _Integer64
|
||||
Dim sChoice As String, sUnsigned As String, sQuit As String
|
||||
Do While sChoice <> "I" And sChoice <> "L" And sChoice <> "6"
|
||||
Input "Please choice among (I)nteger, (L)ong and Integer(6)4 ", sChoice
|
||||
sChoice = UCase$(sChoice)
|
||||
Loop
|
||||
Do While sUnsigned <> "u" And sUnsigned <> "n"
|
||||
Input "Please choice (U)nsigned or (N)ormal? ", sUnsigned
|
||||
sUnsigned = LCase$(sUnsigned)
|
||||
Loop
|
||||
|
||||
If sChoice = "I" Then
|
||||
If sUnsigned = "n" Then iNum = iMax Else iNum = UiMax
|
||||
ElseIf sChoice = "L" Then
|
||||
If sUnsigned = "n" Then iNum = lMax Else iNum = UlMax
|
||||
ElseIf sChoice = "6" Then
|
||||
If sUnsigned = "n" Then iNum = iQBMax Else iNum = UiQBMax
|
||||
End If
|
||||
|
||||
|
||||
For iCount = 0 To iNum Step 1
|
||||
Print iCount; " Press spacebar to exit "
|
||||
sQuit = InKey$
|
||||
Next
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue