#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int getRandom(const int min, const int max) {
return (rand() % (max - min + 1)) + min;
}
int main(void) {
srand(time(NULL));
const int N = 7;
const int X = 5;
for (int i = 0; i < X; i++) {
printf("Group %d: ", i + 1);
for (int j = 0; j < N; j++) {
printf("%d ", getRandom(1, 30));
}
printf("\n");
}
return 0;
}
/*
run:
Group 1: 7 26 19 29 7 21 19
Group 2: 24 29 20 7 4 24 26
Group 3: 19 20 5 2 5 13 28
Group 4: 1 19 17 23 18 25 27
Group 5: 4 15 20 10 10 30 30
*/