Guest User

Untitled

a guest
May 27th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <time.h>
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6. int zufallszahl;
  7. time_t Zeitstempel; // Die momentane Zeit wird gespeichert
  8. tm *nun;
  9. Zeitstempel = time(0);
  10. nun = localtime(&Zeitstempel);
  11.  
  12. srand(nun->tm_sec); // Die Sekunden der momentanen Zeit werden als Startwert für die Zufallszahl benutzt
  13. for(zufallszahl = 0;Lotto[6] < 49;zufallszahl++)
  14. zufallszahl = rand() % 49 + 1;
Add Comment
Please, Sign In to add comment