Files
SCR/SCR3.1/TP4/Exo1/rebours.c
2025-12-05 13:48:10 +01:00

18 lines
350 B
C

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