Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by shanley06

  1. shanley06

    prime numbers

    Wow thanks you guys have helped
  2. shanley06

    prime numbers

    Oh and mgh730 I didn't mean that I've tried your code...I meant that I tried something like that...sorry if you misunderstood me
  3. shanley06

    help with timing

    490 ghz? is that even possible?
  4. shanley06

    prime numbers

    I just got back from camp and started working on it again and I came up with function prime(n) prime=1 for x=2 to sqr(n) if (x mod n)=0 then prime=0 next x It puts out 1 if it's prime and 0 if it isn't.
  5. shanley06

    prime numbers

    Yeah I've tried that too...It works good until I get into the ten-thousands then it starts to take about a minute to calculate and I just don't have that kind of time to sit at my computer for hours on end just to find out if a really big number is prime...I know there is some good formula out...
  6. shanley06

    prime numbers

    I was wondering if anyone knew how to check if a number was prime or not...I already know about using logarthmic integrals and x/ln x but I need something that will give me a good answer every time
  7. shanley06

    Eliminating Out of Space Errors,- Data,-String-Stack in QB45

    You could always use safe mode
  8. shanley06

    how to slow down a pixel

    Also you could just pset((r*cos(d))+x,(r*sin(d))+y) where r is the radius of the cirle, x and y are the x and y coordinates on the screen, and d is the degree to rotate the point around (x,y)
  9. shanley06

    how to slow down a pixel

    Taylor series approximations of sin and cos are sin x=x-x^3/3!+x^5/5!-x^7/7!... cos x=1-x^2/2!+x^4/4!-x^5/5!...
  10. shanley06

    help with random lines in program

    You could make your own line sub that draws the line from point a to point b and before you draw each pixel you could test to see what color the pixel is and if it is not a certain color than you exit the sub
  11. shanley06

    GET TXT FILES IN FOLDER

    shell "dir /o/p" will show all files in a folder
  12. shanley06

    help with random lines in program

    make two random coordinates and then before you draw the line between the two coordinates use the POINT command to check the color of the pixel at those two points and if the pixel color is not equal to 0 then choose two new random coordinates
  13. shanley06

    how to slow down a pixel

    Or you could decrease the interval you move at, instead of your code you could use screen 13 do randomize timer x = int(rnd * 320) y = int(rnd * 200) pset (x,y) a = int(rnd * 4) if a = 1 then x = x + .1 if a = 2 then x = x - .1 if a = 3 then y = y + .1 if a = 4 then y = y - .1 cls loop
  14. shanley06

    IF FILE IS EMPTY

    open the file and have a do until loop that stops once you get to the end of the file, and in the middle of the loop check each data line to see if it has characters or not
  15. shanley06

    deleting a folder

    Thanks

Part and Inventory Search

Back
Top