Slučajni uzorak broja

/ Random (disambiguation) /

.

Randomness is the lack of pattern or predictability in events. A random sequence of events, symbols or steps has no order and does not follow an intelligible pattern or combination. Individual random events are by definition unpredictable, but in many cases the frequency of different outcomes over a large number of events is predictable.

.

#include <iostream>

#include <cstdlib>

#include <ctime>

using namespace std;

int main () {

srand (time(0));

for (int x = 1;  x<25; x++) {

cout << 1+(rand()%6) << endl;

}

}

Debugging Mode


Subscribe / Pratite diskusiju
Notify / Obaveštavaj me
guest
0 Comments / Komentara
Inline Feedbacks
View all comments