const int SIZE = 10; int v[SIZE]; for (int i = 0; i < SIZE; i++) { v[i] = rand() % 100; } for (int i = 0; i < SIZE; i++) { cout << v[i] << " " ; } |
causes the array to look like:
and gives the output:
83 86 77 15 93 35 86 92 49 21