Search:

Type: Posts; User: CommonTater

Search: Search took 0.05 seconds.

  1. He paid me a compliment and even admitted i had a...

    He paid me a compliment and even admitted i had a better solution a bit earlier... I'm thinking he's just evening up the score :D
  2. Ok... what EXACTLY is it doing or not doing? ...

    Ok... what EXACTLY is it doing or not doing?
    What error messages are you getting?
    What warnings/errors are your compiler listing?

    All this is good information... "It doesn't work" tells us...
  3. Nope... look how I did it in message #30 ... copy...

    Nope... look how I did it in message #30 ... copy the form of that, using the new math.

    Also note that sqrt() is for floating point numbers and you're working with integers.
    (You really gotta get...
  4. Be still my fluttering heart... A compliment from...

    Be still my fluttering heart... A compliment from Quzah ... now when's the last time that happened :D
  5. Which is going to alter the value of number for...

    Which is going to alter the value of number for the next function.
  6. Ok... so the number is out of range... what do...

    Ok... so the number is out of range... what do you do about that?
    hint: you don't let it go crashing down into the rest of your program, causing even more problems.

    number*number*number does...
  7. With over a thousand functions in the library,...

    With over a thousand functions in the library, nobody is going to memorize even half of them... and it only gets worse in Windows API where there are over 30,000 functions... Knowing how to look...
  8. When stuff like that happens... look up the...

    When stuff like that happens... look up the keyword in your C library documentation... (which is exactly what I just did)

    In this case the problem is that you need to #include <stdlib.h> or it...
  9. LOL... Point taken.

    LOL... Point taken.
  10. AND another double header... Hi again Quzah!

    AND another double header... Hi again Quzah!
  11. Because you are using the rules of scope...

    Because you are using the rules of scope incorrectly...



    {int number; <--- you start a new scope here
    printf(" enter a positive number between 1 and 10:");
    } ...
  12. Double Header! ... Hi Quzah...

    Double Header! ... Hi Quzah...
  13. No you're not... you're using DevC++ ... a whole...

    No you're not... you're using DevC++ ... a whole different language. There is no Dev C.

    Also you should be aware that compiler and IDE have been abandonware for most of a decade. The compiler is...
  14. You're going to get an error alright... you're...

    You're going to get an error alright... you're using C++ headers and C doesn't have the first clue what "namespace" is.

    Plus your brackets are mismatched ...
  15. if ((number < 1) || (number > 10)) { ...

    if ((number < 1) || (number > 10))
    {
    printf("I specifically said from 1 to 10\n");
    exit(1);
    }

    // rest of program here
  16. In an integer value the least significant (right...

    In an integer value the least significant (right most) bit is always 1 for odd numbers and 0 for even numbers... it's a side effect of computers working in binary.



    if ((number & 1) > 0)
    ...
Results 1 to 16 of 17