Commit | Line | Data |
---|---|---|
1 | #include <sys/types.h> | |
2 | #include <sys/wait.h> | |
3 | ||
4 | #include <stdio.h> | |
5 | #include <stdlib.h> | |
6 | #include <string.h> | |
7 | #include <unistd.h> | |
8 | #include <time.h> | |
9 | ||
10 | int main() { | |
11 | ||
12 | srand(time(NULL)); | |
13 | int randvalue = rand() % 5 + 1; | |
14 | ||
15 | printf("[%d] Je suis la balle et je vole\n", getpid()); | |
16 | ||
17 | sleep(randvalue); | |
18 | ||
19 | return randvalue; | |
20 | } |