Author Topic: Line with repeated numbers  (Read 6056 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Line with repeated numbers
« Reply #15 on: August 04, 2021, 01:00:27 pm »
Heres one from today:
Code: QB64: [Select]
  1. _Title "BlinkingScreenLabel Sub" ' b+ 2021-08-04  for Carlos
  2.  
  3. 'just put the sub call in the loop you use to display the screen it will blink according to limit
  4.     For i = 1 To 15
  5.         BlinkingScreenLabel 1, i, "This is line" + Str$(i), i, 0
  6.     Next
  7.     _Limit 1
  8.  
  9. Sub BlinkingScreenLabel (x, y, txt$, c1~&, c2~&)
  10.     Static blink
  11.     blink = 1 - blink
  12.     saveFore~& = _DefaultColor
  13.     If blink Then Color c1~& Else Color c2~&
  14.     _PrintString (x, y), txt$
  15.     Color saveFore~& 'restore color
  16.  

Offline carloscordeiro

  • Forum Regular
  • Posts: 102
    • View Profile
Re: Line with repeated numbers
« Reply #16 on: August 04, 2021, 05:55:44 pm »
Bplus

Below is an image of the alert that I intended to insert, to make the code more elegant.

As there is no simple way to do this.

I'll leave it as it is.

I want you to know, that when you answer my weird questions.

You make me so happy.

Thank you from the heart.

Carlos

Code: QB64: [Select]
  1. [/_Title "Qbasic 64" ' Many lines, created with help friend Bplus
  2. Screen _NewImage(600, 600, 256)
  3. _Delay .25
  4.  
  5. 'Moldura...
  6. Line (0, 0)-(599, 599), 11, B 'Moldura inteira
  7. Line (1, 1)-(598, 598), 11, B
  8. Line (2, 2)-(597, 597), 11, B
  9. Line (3, 3)-(596, 596), 11, B
  10. Line (4, 4)-(595, 595), 11, B
  11.  
  12. Line (599, 43)-(2, 43), 11, B 'Linha Horizontal
  13. Line (599, 44)-(2, 44), 11, B
  14.  
  15. 'Mostra Data
  16. d$ = Mid$(Date$, 1, 3)
  17. c$ = Mid$(Date$, 4, 3)
  18. e$ = Mid$(Date$, 7, 4)
  19. f$ = c$ + d$ + e$
  20.  
  21. Color 11: Locate 2, 28: Print "* * * Mega Sena * * *"
  22. Locate 2, 4: Print f$
  23. '--------------------------------------------------------------------------------
  24. Dim nt(0 To 3000) As String
  25. Dim cadastro As Long
  26.  
  27.  
  28. If _FileExists("mega.txt") Then
  29.      Open "mega.txt" For Input As #1
  30.      cadastro = LOF(1) \ 19
  31.      For t = 1 To cadastro
  32.           Line Input #1, nt$(t)
  33.      Next
  34.      Close
  35.      Open "mega.txt" For Append As #1
  36.      Open "mega.txt" For Output As #1
  37.      done = 1
  38.  
  39.      Color 30
  40.      Locate 12, 3: Print "Concurso =>"; cadastro; "= "; nt$(cadastro)
  41.      Locate 30, 3: Print "Pressione [ESC] para sair."
  42.      Locate 4, 3: Print "N" + Chr$(163); "meros de concursos =>"; cadastro
  43.  
  44.      Locate 6, 14: Print "_____________"
  45.      Locate 6, 3: Print "Dezenas => ";
  46.      a$ = ExtendedInput$ 'code Mr. SMcNeill
  47.  
  48.      For r = 6 To 30
  49.           Locate r, 2: Print Spc(72)
  50.      Next
  51.  
  52.      For i = 1 To 12 Step 2
  53.           x$ = x$ + Mid$(a$, i, 2) + " "
  54.      Next
  55.  
  56.      x$ = _Trim$(x$)
  57.  
  58.      For i = 1 To cadastro
  59.           If x$ = nt$(i) Then
  60.                done = 0
  61.                Color 48
  62.                Locate 15, 25: Print "Contest:"; i; "exists!!!! "
  63.                Locate 17, 29: Print ; nt$(i);
  64.                Locate 18, 29: Print "================="
  65.                Color 30
  66.                Beep
  67.                Exit For
  68.           End If
  69.      Next
  70.  
  71.      Locate 8, 3: Print "Dezenas => "; x$
  72.      Locate 10, 3: Print "N£meros de digitos ="; Len(a$)
  73.  
  74.  
  75.      If Len(a$) = 12 And done = 1 Then
  76.           Print #1, x$
  77.           Color 48
  78.           Locate 15, 24: Print "Dezenas salvas com sucesso!!!"
  79.           Locate 16, 24: Print "============================="
  80.           Locate 18, 30: Print x$
  81.           Locate 19, 30: Print "================="
  82.           cadastro = cadastro + 1
  83.           nt$(cadastro) = x$
  84.           nt$ = x$
  85.           Beep
  86.      ElseIf Len(a$) > 12 Then
  87.           Color 48
  88.           Locate 20, 23: Print "Number of digits greater than 12 =>"; Len(a$)
  89.           Locate 22, 30: Print ; a$
  90.           Locate 23, 31: Print "============="
  91.           Color 30
  92.           Beep
  93.      End If
  94.  
  95.      x$ = ""
  96.      Scrn$ = InKey$
  97. Loop Until Scrn$ = Chr$(27)
  98.  
  99. Play "o3l32ceff+g"
  100. Play "mfo4l64ceg>c"
  101.  
  102. OE20 = _LoadFont("century.ttf", 82)
  103. _Font OE20
  104. Color 11 ' &H200000FF
  105. Locate 4, 90: Print " QBasic 64 "
  106. Locate 5, 90: Print " -------------- "
  107.  
  108. '--------------------------------------------------------------------------------
  109.  
  110. Function ExtendedInput$ 'code Mr. SMcNeill
  111.      PCopy 0, 1
  112.      A = _AutoDisplay: X = Pos(0): Y = CsrLin
  113.      CP = 0: OldCP = 0 'Cursor Position
  114.      _KeyClear
  115.      Do
  116.           PCopy 1, 0
  117.           If _KeyDown(100307) Or _KeyDown(100308) Then AltDown = -1 Else AltDown = 0
  118.           k = _KeyHit
  119.           If AltDown Then
  120.                Select Case k 'ignore all keypresses except ALT-number presses
  121.                     Case 48 TO 57: AltWasDown = -1: alt$ = alt$ + Chr$(k)
  122.                End Select
  123.           Else
  124.                Select Case k 'without alt, add any keypresses to our input
  125.                     Case 8
  126.                          oldin$ = in$
  127.                          If CP > 0 Then OldCP = CP: CP = CP - 1
  128.                          in$ = Left$(in$, CP) + Mid$(in$, CP + 2) 'backspace to erase input
  129.                     Case 9
  130.                          oldin$ = in$
  131.                          in$ = Left$(in$, CP) + Space$(4) + Mid$(in$, CP + 1) 'four spaces for any TAB entered
  132.                          OldCP = CP
  133.                          CP = CP + 4
  134.                     Case 32 TO 128
  135.                          If _KeyDown(100305) Or _KeyDown(100306) Then
  136.                               If k = 118 Or k = 86 Then
  137.                                    oldin$ = in$
  138.                                    in$ = Left$(in$, CP) + _Clipboard$ + Mid$(in$, CP + 1) 'ctrl-v paste
  139.                                    'CTRL-V leaves cursor in position before the paste, without moving it after.
  140.                                    'Feel free to modify that behavior here, if you want it to move to after the paste.
  141.                                    CP = CP + Len(_Clipboard$)
  142.                               End If
  143.                               If k = 122 Or k = 90 Then Swap in$, oldin$: Swap OldCP, CP 'ctrl-z undo
  144.                          Else
  145.                               oldin$ = in$
  146.                               in$ = Left$(in$, CP) + Chr$(k) + Mid$(in$, CP + 1) 'add input to our string
  147.                               OldCP = CP
  148.                               CP = CP + 1
  149.                          End If
  150.                     Case 18176 'Home
  151.                          CP = 0
  152.                     Case 20224 'End
  153.                          CP = Len(in$)
  154.                     Case 21248 'Delete
  155.                          oldin$ = in$
  156.                          in$ = Left$(in$, CP) + Mid$(in$, CP + 2)
  157.                     Case 19200 'Left
  158.                          CP = CP - 1
  159.                          If CP < 0 Then CP = 0
  160.                     Case 19712 'Right
  161.                          CP = CP + 1
  162.                          If CP > Len(in$) Then CP = Len(in$)
  163.                End Select
  164.           End If
  165.           alt$ = Right$(alt$, 3)
  166.           If AltWasDown = -1 And AltDown = 0 Then
  167.                v = Val(alt$)
  168.                If v >= 0 And v <= 255 Then in$ = in$ + Chr$(v)
  169.                alt$ = "": AltWasDown = 0
  170.           End If
  171.           blink = (blink + 1) Mod 30
  172.           Locate Y, X
  173.           Print Left$(in$, CP);
  174.           If blink \ 15 Then Print " "; Else Print "_";
  175.           Print Mid$(in$, CP + 1)
  176.  
  177.           _Display
  178.           _Limit 30
  179.      Loop Until k = 13
  180.  
  181.      PCopy 1, 0
  182.      Locate Y, X: Print in$
  183.      ExtendedInput$ = in$
  184.      If A Then _AutoDisplay
  185. ]
Imagem_01.jpg
* Imagem_01.jpg (Filesize: 86.09 KB, Dimensions: 723x698, Views: 184)
Imagem_02.jpg
* Imagem_02.jpg (Filesize: 80.12 KB, Dimensions: 737x717, Views: 169)
* Cadastro Mega V1.txt (Filesize: 6.33 KB, Downloads: 125)
* mega.txt (Filesize: 44.44 KB, Downloads: 131)

Offline carloscordeiro

  • Forum Regular
  • Posts: 102
    • View Profile
Re: Line with repeated numbers
« Reply #17 on: August 04, 2021, 06:13:23 pm »
Bplus, I'm going to overdo the questions a bit.

Would you have an idea, to reduce the number of for next and if, in this other code?

You don't need to create other code, only if you have a better idea than mine.

Carlos
Code: QB64: [Select]
  1. _Title "Qbasic 64" ' Many lines, created with help friend Bplus
  2. Screen _NewImage(700, 740, 256)
  3. _Delay .25
  4.  
  5. 'Moldura...
  6. Line (0, 0)-(699, 719), 11, B 'Moldura inteira
  7. Line (1, 1)-(698, 718), 11, B
  8. Line (2, 2)-(697, 717), 11, B
  9. Line (3, 3)-(696, 716), 11, B
  10. Line (4, 4)-(695, 715), 11, B
  11.  
  12. Line (699, 43)-(2, 43), 11, B 'Linha Horizontal
  13. Line (699, 44)-(2, 44), 11, B
  14.  
  15. Line (336, 716)-(336, 44), 11, B 'Linha Vertical
  16. Line (335, 716)-(335, 44), 11, B
  17.  
  18. 'Mostra Data
  19. d$ = Mid$(Date$, 1, 3)
  20. c$ = Mid$(Date$, 4, 3)
  21. e$ = Mid$(Date$, 7, 4)
  22. f$ = c$ + d$ + e$
  23.  
  24. Color 11: Locate 2, 34: Print "* * * Mega Sena * * *"
  25. Locate 2, 4: Print f$: Color 7
  26.  
  27. '------------------------------------------------------------------------
  28. Dim nt(1 To 3000) As String
  29. Dim soma1(1 To 500) As String
  30. Dim soma2(1 To 500) As String
  31. Dim cor1(80) As _Integer64
  32. Dim seq(500) As _Integer64
  33. 'Dim re As _Integer64
  34. Dim file(1 To 50) As String
  35. '------------------------------------------------------------------------
  36.  
  37. Open "mega.txt" For Input As #1
  38. total = LOF(1) \ 19
  39. For t = 1 To total
  40.      Line Input #1, nt$(t)
  41.  
  42.  
  43. Color 30: Locate 4, 3: Print "N" + Chr$(163); "meros de concursos =>"; total
  44.      g = 0
  45.      h = 3
  46.      qu = 0
  47.      te = 0
  48.      Color 30
  49.      Locate 6, 14: Print "_____________"
  50.      Locate 6, 3: Print "Dezenas => ";
  51.      a$ = ExtendedInput$ 'code Mr. SMcNeill
  52.  
  53.      For i = 1 To 12 Step 2
  54.           x$ = x$ + Mid$(a$, i, 2) + " "
  55.      Next
  56.      Pes$ = _Trim$(x$)
  57.      If Len(Pes$) = 17 Then
  58.  
  59.           For S = 4 To 44
  60.                Locate S, 44: Print Spc(40)
  61.           Next S
  62.  
  63.           Color 78
  64.           Locate 8, 3: Print "Dezenas => "; Pes$; " ="; Len(Pes$)
  65.           Locate 9, 14: Print "================="
  66.  
  67.           For re = 1 To total
  68.                If h > 41 Then
  69.                     _KeyClear
  70.                     Color 13: Locate 44, 44: Print "Pressione Enter para continuar..."
  71.                     Color 7
  72.                     Do
  73.                          _Limit 30
  74.                     Loop Until InKey$ = Chr$(13)
  75.                     For S = 4 To 44
  76.                          Locate S, 44: Print Spc(40)
  77.                     Next S
  78.                     h = 3
  79.                End If
  80.  
  81.                h = h + 1
  82.                x = 49
  83.  
  84.                Color 15: Locate h, x - 5: Print Right$("0000" + LTrim$(Str$(re)), 4); " => "
  85.  
  86.                For i = 1 To 17 Step 3
  87.                     x = x + 3
  88.                     For r = 1 To 17 Step 3
  89.                          If Mid$(nt$(re), i, 2) = Mid$(Pes$, r, 2) Then
  90.                               g = g + 1
  91.                               cor1(g) = i
  92.                               Exit For
  93.                          Else
  94.                               Color 7: Locate h, x: Print Mid$(nt$(re), i, 2)
  95.                          End If
  96.                     Next r
  97.                Next i
  98.  
  99.                If g <= 2 Then
  100.                     Locate h, 44: Print Spc(29)
  101.                     h = h - 1
  102.                End If
  103.  
  104.                If g = 3 Then
  105.                     Color 12
  106.                     Locate h, x + 3: Print "=>";: Print " TERNO"
  107.                     For ag = 1 To 3
  108.                          te = te + 1
  109.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  110.                          soma2(te) = Mid$(nt$(re), cor1(ag), 2)
  111.                     Next ag
  112.                     Color 7
  113.                End If
  114.  
  115.                If g = 4 Then
  116.                     Color 10
  117.                     Locate h, x + 3: Print "=>";: Print " QUADRA"
  118.                     For ag = 1 To 4
  119.                          qu = qu + 1
  120.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  121.                          soma1$(qu) = Mid$(nt$(re), cor1(ag), 2)
  122.                     Next ag
  123.                     Color 7
  124.                End If
  125.  
  126.                If g = 5 Then
  127.                     Color 3
  128.                     Locate h, x + 3: Print "=>";: Print " QUINA"
  129.                     For ag = 1 To 5
  130.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  131.                     Next ag
  132.                     Color 7
  133.                End If
  134.  
  135.                If g = 6 Then
  136.                     Color 14
  137.                     Locate h, x + 3:: Print "=>";: Print " SENA "
  138.                     For ag = 1 To 6
  139.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  140.                     Next ag
  141.                     Color 7
  142.                End If
  143.                g = 0
  144.           Next
  145.           a = 12
  146.           For e = 10 To 22
  147.                Locate e, 2: Print Spc(35)
  148.           Next
  149.           '-------------------------------------------------------------------
  150.           For i = 1 To qu '- 1
  151.                t = 1
  152.                For j = i + 1 To qu
  153.                     If _Trim$(soma1(i)) = _Trim$(soma1(j)) And _Trim$(soma1(i)) <> "" Then
  154.                          t = t + 1
  155.                          soma1(j) = ""
  156.                     End If
  157.                Next
  158.                seq(i) = t
  159.                If soma1(i) <> "" Then
  160.                     a = a + 1
  161.                     Color 30
  162.                     Locate a, 3
  163.                     Print "Dez = ";
  164.                     Color 10
  165.                     Locate a, 8
  166.                     Print " "; soma1(i);
  167.                     Color 30
  168.                     Locate a, 12
  169.                     Print "="; seq(i)
  170.                End If
  171.           Next
  172.           '---------------------------------------------------------------------
  173.           a = 12
  174.           For i = 1 To te '- 1
  175.                t = 1
  176.                For j = i + 1 To te
  177.                     If _Trim$(soma2(i)) = _Trim$(soma2(j)) And _Trim$(soma2(i)) <> "" Then
  178.                          t = t + 1
  179.                          soma2(j) = ""
  180.                     End If
  181.                Next
  182.                seq(i) = t
  183.                If soma2(i) <> "" Then
  184.                     a = a + 1
  185.                     Color 30
  186.                     Locate a, 23
  187.                     Print "Dez = ";
  188.                     Color 12
  189.                     Locate a, 28
  190.                     Print " "; soma2(i);
  191.                     Color 30
  192.                     Locate a, 32
  193.                     Print "="; seq(i)
  194.                End If
  195.           Next
  196.           '-----------------------------------------------------------------------
  197.  
  198.      Else
  199.           Beep
  200.      End If
  201.      Color 13: Locate 44, 58: Print "Pressione [ESC] para sair..."
  202.      x$ = ""
  203.      Scrn$ = InKey$
  204. Loop Until Scrn$ = Chr$(27)
  205.  
  206. Play "o3l32ceff+g"
  207. Play "mfo4l64ceg>c"
  208.  
  209. OE20 = _LoadFont("century.ttf", 82)
  210. _Font OE20
  211. Color 11 ' &H200000FF
  212. Locate 4, 125: Print " QBasic 64 "
  213. Locate 5, 125: Print " -------------- "
  214.  
  215. '-------------------------------------------------------------------------------------
  216. Function ExtendedInput$ ' Mr. McNeill's extended entrance
  217.      PCopy 0, 1
  218.      A = _AutoDisplay: X = Pos(0): Y = CsrLin
  219.      CP = 0: OldCP = 0 'Cursor Position
  220.      _KeyClear
  221.      Do
  222.           PCopy 1, 0
  223.           If _KeyDown(100307) Or _KeyDown(100308) Then AltDown = -1 Else AltDown = 0
  224.           k = _KeyHit
  225.           If AltDown Then
  226.                Select Case k 'ignore all keypresses except ALT-number presses
  227.                     Case 48 TO 57: AltWasDown = -1: alt$ = alt$ + Chr$(k)
  228.                End Select
  229.           Else
  230.                Select Case k 'without alt, add any keypresses to our input
  231.                     Case 8
  232.                          oldin$ = in$
  233.                          If CP > 0 Then OldCP = CP: CP = CP - 1
  234.                          in$ = Left$(in$, CP) + Mid$(in$, CP + 2) 'backspace to erase input
  235.                     Case 9
  236.                          oldin$ = in$
  237.                          in$ = Left$(in$, CP) + Space$(4) + Mid$(in$, CP + 1) 'four spaces for any TAB entered
  238.                          OldCP = CP
  239.                          CP = CP + 4
  240.                     Case 32 TO 128
  241.                          If _KeyDown(100305) Or _KeyDown(100306) Then
  242.                               If k = 118 Or k = 86 Then
  243.                                    oldin$ = in$
  244.                                    in$ = Left$(in$, CP) + _Clipboard$ + Mid$(in$, CP + 1) 'ctrl-v paste
  245.                                    'CTRL-V leaves cursor in position before the paste, without moving it after.
  246.                                    'Feel free to modify that behavior here, if you want it to move to after the paste.
  247.                                    CP = CP + Len(_Clipboard$)
  248.                               End If
  249.                               If k = 122 Or k = 90 Then Swap in$, oldin$: Swap OldCP, CP 'ctrl-z undo
  250.                          Else
  251.                               oldin$ = in$
  252.                               in$ = Left$(in$, CP) + Chr$(k) + Mid$(in$, CP + 1) 'add input to our string
  253.                               OldCP = CP
  254.                               CP = CP + 1
  255.                          End If
  256.                     Case 18176 'Home
  257.                          CP = 0
  258.                     Case 20224 'End
  259.                          CP = Len(in$)
  260.                     Case 21248 'Delete
  261.                          oldin$ = in$
  262.                          in$ = Left$(in$, CP) + Mid$(in$, CP + 2)
  263.                     Case 19200 'Left
  264.                          CP = CP - 1
  265.                          If CP < 0 Then CP = 0
  266.                     Case 19712 'Right
  267.                          CP = CP + 1
  268.                          If CP > Len(in$) Then CP = Len(in$)
  269.                End Select
  270.           End If
  271.           alt$ = Right$(alt$, 3)
  272.           If AltWasDown = -1 And AltDown = 0 Then
  273.                v = Val(alt$)
  274.                If v >= 0 And v <= 255 Then in$ = in$ + Chr$(v)
  275.                alt$ = "": AltWasDown = 0
  276.           End If
  277.           blink = (blink + 1) Mod 30
  278.           Locate Y, X
  279.           Print Left$(in$, CP);
  280.           If blink \ 15 Then Print " "; Else Print "_";
  281.           Print Mid$(in$, CP + 1)
  282.  
  283.           _Display
  284.           _Limit 30
  285.      Loop Until k = 13
  286.  
  287.      PCopy 1, 0
  288.      Locate Y, X: Print in$
  289.      ExtendedInput$ = in$
  290.      If A Then _AutoDisplay
  291.  
  292.  

A lot for next and if

Code: QB64: [Select]
  1.                If g <= 2 Then
  2.                     Locate h, 44: Print Spc(29)
  3.                     h = h - 1
  4.                End If
  5.  
  6.                If g = 3 Then
  7.                     Color 12
  8.                     Locate h, x + 3: Print "=>";: Print " TERNO"
  9.                     For ag = 1 To 3
  10.                          te = te + 1
  11.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  12.                          soma2(te) = Mid$(nt$(re), cor1(ag), 2)
  13.                     Next ag
  14.                     Color 7
  15.                End If
  16.  
  17.                If g = 4 Then
  18.                     Color 10
  19.                     Locate h, x + 3: Print "=>";: Print " QUADRA"
  20.                     For ag = 1 To 4
  21.                          qu = qu + 1
  22.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  23.                          soma1$(qu) = Mid$(nt$(re), cor1(ag), 2)
  24.                     Next ag
  25.                     Color 7
  26.                End If
  27.  
  28.                If g = 5 Then
  29.                     Color 3
  30.                     Locate h, x + 3: Print "=>";: Print " QUINA"
  31.                     For ag = 1 To 5
  32.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  33.                     Next ag
  34.                     Color 7
  35.                End If
  36.  
  37.                If g = 6 Then
  38.                     Color 14
  39.                     Locate h, x + 3:: Print "=>";: Print " SENA "
  40.                     For ag = 1 To 6
  41.                          Locate h, 51 + cor1(ag): Print Mid$(nt$(re), cor1(ag), 2)
  42.                     Next ag
  43.                     Color 7
  44.                End If
  45.                g = 0
  46.           Next

* Mega Sena V5.txt (Filesize: 10.17 KB, Downloads: 110)
* mega.txt (Filesize: 44.44 KB, Downloads: 132)
Imagem_03.jpg
* Imagem_03.jpg (Filesize: 194.92 KB, Dimensions: 773x843, Views: 181)
« Last Edit: August 04, 2021, 06:17:27 pm by carloscordeiro »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Line with repeated numbers
« Reply #18 on: August 04, 2021, 06:26:17 pm »
Hi Carlos,

Looks OK to me, but I don't really know what it's all about. If you had many more g's I would suggest using Select Case or ElseIf ... Then and loose some End If lines but right now you are in gray area where there is no big difference.

Your screen layouts look nice :)
« Last Edit: August 04, 2021, 06:27:21 pm by bplus »

Offline carloscordeiro

  • Forum Regular
  • Posts: 102
    • View Profile
Re: Line with repeated numbers
« Reply #19 on: August 04, 2021, 07:06:16 pm »
Quote
Your screen layouts look nice :)

Thanks for the compliment

This code is for querying the "mega.txt" database how many times there are 3 numbers, 4 numbers and 5 numbers.

He does just that.

Would using Select Case or ElseIf improve the code?

Would it decrease a little of the "if and for next"?

Insert this sequence in the code: 041112444557

http://loterias.caixa.gov.br/wps/portal/loterias/landing/megasena/

Site where I feed the txt database




« Last Edit: August 04, 2021, 07:08:34 pm by carloscordeiro »