QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 

 Return to Index  

going a little further

June 13 2011 at 4:20 PM
lawgin  (no login)


Response to another improvement...

 

Your last version gets 22 terms before an overflow occurs. This slight modification gets 40 terms before getting bogged down in scientific notation.

DIM n AS DOUBLE, o AS DOUBLE
DIM i AS INTEGER
CLS
n = 1
FOR i = 1 TO 45
o = n
DO WHILE n / i - INT(n / i) > 0
n = n + o
LOOP
PRINT n
NEXT


 
 Respond to this message   
Responses

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement