Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

David1987

@David1987
About
Posts
833
Topics
35
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do I generate a number divisable by 5, and check it?
    D David1987

    Good luck dividing zero by zero.

    C# question lounge

  • Lots of guideline breaking in the C# forums
    D David1987

    Many people are ridiculing stephen for asking how to generate numbers divisible by 5. Example: http://www.codeproject.com/Messages/4002238/Re-How-do-I-generate-a-number-divisable-by-5-and-c.aspx[^]

    Site Bugs / Suggestions tutorial csharp com

  • How do I generate a number divisable by 5, and check it?
    D David1987

    x is not a natural number there.

    C# question lounge

  • Work starting again..
    D David1987

    Can this account please be disabled? I can't trust myself not to spend an extreme amount of time here while I'm supposed to be doing something.

    Site Bugs / Suggestions question

  • How do I generate a number divisable by 5, and check it?
    D David1987

    Yes but that's precisely the point, you can choose.

    C# question lounge

  • Tie
    D David1987

    Neither, ※ is definitely weirder than either of those

    The Lounge question

  • How do I generate a number divisable by 5, and check it?
    D David1987

    Nope. You seem to think that that is the only definition of divisibility. I did not personally redefine anything. There is no natural number n such that 0/x=n so no x evenly divides 0. If you use the definition with integers instead of natural numbers, everything divides zero. Also, the prime factorization of zero is empty.

    C# question lounge

  • How do I generate a number divisable by 5, and check it?
    D David1987

    It depends on the definition of divisibility that you use. Zero can also be divisible by anything, if you use an other definition.

    C# question lounge

  • How do I generate a number divisable by 5, and check it?
    D David1987

    Numbers that end in 0 are also divisible by 5 (except zero) So you're right.

    C# question lounge

  • How do I generate a number divisable by 5, and check it?
    D David1987

    Generate a random integer in [2000, 19999] and multiply it by 5. The result will always be in [10000, 99999] (ie 5 decimal digits) and be divisible by 5 (by construction)

    int yourNumber = 5 * rand.Next(2000, 20000); // remember the max-bound is exclusive
    if (yourNumber % 5 != 0)
    Console.WriteLine("the universe is wrong");

    And make sure you reuse a single instance of Random, if you create new ones the result won't be random. [/spoon feeding]

    C# question lounge

  • Verity asks an interesting question. [modified]
    D David1987

    That isn't C ;P

    The Lounge question

  • have you head about Ultrasurf
    D David1987

    It says "proxy-based" Just an other SSL proxy..

    The Lounge

  • Extreme Toothbrushing
    D David1987

    That what I do every day.

    The Lounge com question

  • Bored, because...
    D David1987

    Play TF2. The solution to all boredom.

    The Lounge game-dev help discussion

  • Moving and cleaning...
    D David1987

    Didn't you see that when you picked it?

    The Lounge question com career

  • What Will You Do When There Are No More PCs?
    D David1987

    Uhm yea, that's not what I meant by soon :)

    The Lounge database com hosting cloud business

  • What Will You Do When There Are No More PCs?
    D David1987

    It won't happen. At least not soon. All this mobile stuff is nice and all, but Real Work (and Real Games) continues to be done on PC's.

    The Lounge database com hosting cloud business

  • What should I read next?
    D David1987

    It's interesting, but it appears to be pulling suggestions out of someones arse.

    The Lounge com question

  • 5 Monkeys
    D David1987

    Why don't they just throw the ladder over? [/missing the point on purpose]

    The Lounge php html database com

  • A Question
    D David1987

    Most of the members just signed up so they can download the code that goes with articles.

    The Lounge question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups