Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <time.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int zufallszahl;
- time_t Zeitstempel; // Die momentane Zeit wird gespeichert
- tm *nun;
- Zeitstempel = time(0);
- nun = localtime(&Zeitstempel);
- srand(nun->tm_sec); // Die Sekunden der momentanen Zeit werden als Startwert für die Zufallszahl benutzt
- for(zufallszahl = 0;Lotto[6] < 49;zufallszahl++)
- zufallszahl = rand() % 49 + 1;
Add Comment
Please, Sign In to add comment