Code Snippets C

#include
#include
const int MAX = 40;
int main()
{
int index;
for (index = 0; index < 40; ++index) {
int number;
number = rand();
printf("%d\n", (number % (MAX-1)) +1);
}
return (0);
}