Search:

Type: Posts; User: laserlight

Search: Search took 0.23 seconds.

  1. Replies
    108
    Views
    67,308

    Riddle #4: if-statement considered harmful

    I had the impression that proving that NAND and NOR are universal gates is a pretty common assignment for first or second year computing and engineering students.
  2. Replies
    108
    Views
    67,308

    Riddle #4: if-statement considered harmful

    No, it will return 1 for non-zero (or true, in the case of C++, which will be converted to 1).
  3. Replies
    108
    Views
    67,308

    Riddle #4: if-statement considered harmful

    Oh, this is good. Every since iMalc pointed out that a simple return a - b; is vulnerable to arithmetic overflow, I have been rather depressed over having to use the more verbose ternary operator...
  4. Replies
    108
    Views
    67,308

    Riddle #3: three dwarfs, two paths, one life

    I was inspired by this: Security.
  5. Replies
    108
    Views
    67,308

    Riddle #4: if-statement considered harmful

    I presume that includes ternary operator, and that this is either C or C++?
  6. Replies
    108
    Views
    67,308

    Riddle #3: three dwarfs, two paths, one life

    I don't think so. I think that it is merely an unstated assumption. I wanted to propose the solution of just capturing the dwarves and dragging them in a direction to see their response, but then I...
  7. Replies
    108
    Views
    67,308

    Riddle #3: three dwarfs, two paths, one life

    hmm... but that seems to assume that the dwarves are benevolent. If they are (or more accurately, could be) malicious, then you have to phrase that second question more explicitly to your advantage.
  8. Replies
    108
    Views
    67,308

    Number theory in 21 minutes

    Right, but honestly I do not see how it proves the property. Could you elaborate?
  9. Replies
    108
    Views
    67,308

    Number theory in 21 minutes

    I think zacs7 forgot the phrase "within the given range" or "greater than 3".
Results 1 to 9 of 9