Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Welcome to 2023.
#5
(02-08-2023, 05:31 AM)PhilOfPerth Wrote: An interesting program!
I wish I knew how it works though - it's quite cryptic to me!
Any chance of naming some variables, to enlighten dummies like me? 
And do the labels "80" and "0" have a purpose?

For @PhilOfPerth
Code: (Select All)
'yearInteger/testInteger = yearInteger\testInteger is one way to see if yearInteger is divided by testInteger

' / is for float return a number that might have decimals
' \ is for an Integer return a number without decimals
' When the two divisions return exactly same number the bottom number divides the top exactly.

Dim As Long testInteger, yearInteger

yearInteger = 2023
For testInteger = 2 To Sqr(yearInteger) ' <<< primes of a Number will be less than or = to Square Root of Number
    If yearInteger / testInteger = yearInteger \ testInteger Then Print testInteger; "divides"; yearInteger; yearInteger / testInteger; "times."
Next
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Welcome to 2023. - by eoredson - 02-08-2023, 03:39 AM
RE: Welcome to 2023. - by PhilOfPerth - 02-08-2023, 05:31 AM
RE: Welcome to 2023. - by bplus - 02-08-2023, 03:32 PM
RE: Welcome to 2023. - by eoredson - 02-08-2023, 05:40 AM
RE: Welcome to 2023. - by PhilOfPerth - 02-08-2023, 09:03 AM
RE: Welcome to 2023. - by PhilOfPerth - 02-08-2023, 11:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help installing QB64PE on KDE Neon 2023 (Linux) Dav 4 1,266 07-27-2023, 05:12 PM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)