CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <cstdlib>
using namespace std;
int main () {
srand(98);
for (int x = 1; x <= 10; x++) {
cout << 1 + (rand() % 6) << endl;
}
cout <<"how this function works?"<<endl;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run