Ludic numbers: Difference between revisions
Changed code so that ludic function is only called once for the largest value
(Added FreeBASIC) |
(Changed code so that ludic function is only called once for the largest value) |
||
Line 1,202:
Dim As Integer count = 1, count2
Dim As Integer i, j, k = 1
Dim As Integer ub =
Dim a(2 To ub) As Integer
For i = 2 To ub : a(i) = i : Next
Line 1,239:
Dim i As Integer
Dim lu() As Integer
ludic(
Print "The first 25 Ludic numbers are :"
For i = 1 To 25
Line 1,245:
Print " ";
Next
Print
Dim As Integer Count = 0
For i = 1 To 1000
If lu(i) <= 1000 Then
Line 1,257 ⟶ 1,255:
End If
Next
Print
Print "There are"; count; " Ludic numbers <= 1000"
Line 1,263 ⟶ 1,260:
Print "The 2000th to 2005th Ludics are :"
For i = 2000 To 2005
Print lu(i); " ";
Next
Print : Print
Line 1,273 ⟶ 1,268:
Dim As Integer j, k, ldc
Dim b As Boolean
For i = 1 To 248
ldc = lu(i)
|