cpp_utils/zufallszahlen.cpp

18 lines
268 B
C++

#include <iostream>
#include <cstdlib>
#include <ctime>
using std::cout;
using std::endl;
inline void zufallszahl()
{
cout << RAND_MAX << endl;
srand((unsigned int) time(0));
for(int i=1; i<=20; i++){
cout << rand() % 6 +1 << " ";
cout << endl;
}
}