tkt
This commit is contained in:
17
SCR3.1/TP4/Exo1/rebours.c
Normal file
17
SCR3.1/TP4/Exo1/rebours.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user