SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
jroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago

know the features of your language

lemmy.world

message-square
147
fedilink
627

know the features of your language

lemmy.world

jroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago
message-square
147
fedilink
  • unalivejoy@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    2
    ·
    edit-2
    1 year ago

    This must be a custom random function, because it’s standard for random to return a float between 0-1 exclusive. Maybe you meant to multiply by 100 instead of modulo.

    • drolex@sopuli.xyz
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      1 year ago

      I think for once I didn’t fuck up.

      https://cplusplus.com/reference/cstdlib/rand/

      • Snazz@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        You guys are talking about two different things. Random integer vs random float

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 328 users / day
  • 1.86K users / week
  • 2.53K users / month
  • 10.3K users / 6 months
  • 437 local subscribers
  • 35.7K subscribers
  • 1.73K Posts
  • 38.2K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org