Navigation

    cpp-logo

    C++ Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Groups
    1. Home
    2. Tags
    3. zufallszahlen
    Log in to post

    • Lottozahlen ohne Wiederholung
      C (alle ISO-Standards) • array zufallszahlen lotto zahlen wiederholung • • Luckyingmar  

      46
      0
      Votes
      46
      Posts
      748
      Views

      @Jockelx sagte in Lottozahlen ohne Wiederholung: Hallo, typischer Algorithmus für Lottozahlen ziehen ist: Array a mit Zahlen 1 bis 49 for i=0 bis 5 { x = rand(49-i) result[i] = a[x]; swap(a[x], a[49-i]); // gezogene Zahl aus dem rand-Bereich raus nehmen }
    • D

      Zufallszahlen
      C++ (alle ISO-Standards) • random zufallszahlen randomdevice • • Deuterium42  

      14
      0
      Votes
      14
      Posts
      436
      Views

      @manni66 Du verwechselst hier eh nicht gerade die libstdc++ und GCC...?