Integer sequence: Difference between revisions

no edit summary
No edit summary
Line 2,097:
 
Pythons integers are of arbitrary large precision and so programs would probably keep going until OS or hardware system failure.
 
 
=={{header|QB64}}==
<lang QB64>
 
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
</lang>
 
=={{header|Q}}==