This commit is contained in:
2025-10-02 15:09:43 +02:00
commit 7cdaf924cf
49 changed files with 967 additions and 0 deletions

19
TP4/Ex1:/rebours.c Normal file
View File

@@ -0,0 +1,19 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char* argv[])
{
assert(argc == 2);
int value = strtol(argv[1], NULL, 0);
pid_t p = getpid();
printf("%d: debut\n",p);
for(int i = value; i>0; i--){
printf("%d: %d\n",p,i);
sleep(1);
}
printf("%d: fin\n",p);
return EXIT_SUCCESS;
}