Search:

Type: Posts; User: Breek

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    7,881

    int factor = num / 2; //begin from halfway, work...

    int factor = num / 2; //begin from halfway, work way down to 1 (since 2 * (num / 2) = (num / 2) * 2)


    You could also just get the square root here, it may be a bit faster.

    int factor =...
  2. Replies
    21
    Views
    7,881

    To find if a number is Perfect, really fast: ...

    To find if a number is Perfect, really fast:

    For values of n starting at 2 and going up, try:

    (2^n - 1) This will give you the value of 3.

    You can check if a number is prime with this...
  3. Replies
    2
    Views
    805

    Pixel Mapping and Cursor problems

    Would anyone be so kind as to tell me how to get rid of the blinking cursor in C++?

    Gimme some numbers: _ <--blinking
    to
    Gimme some numbers:

    Additionally, does anyone know anything...
Results 1 to 3 of 3